logstash-output-redis-increment 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/redis-increment.rb +21 -17
- data/logstash-output-redis-increment.gemspec +2 -3
- metadata +13 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10f3efd161186f2fff1c32c023fe70568d95939b8b697786184f452bd752096b
|
4
|
+
data.tar.gz: 97c6d152562ca73ef89254bc86ad6ef89c9dda0e868994af8a0e6b86230ee096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a333a54bd62ed90749c06f7ab9dcc0bfbf9450553b7e82f586a8ae3884533bc69b96ccfc0adafa2ff7b40ea6cc68c191aad407aa0c492842509cbf6d0dde308b
|
7
|
+
data.tar.gz: 87d342758eb11b353c33bff74153afb21ca74aa7b7ae602cf3a3f34f7b00c71d712c2e90ae809ca75090d7cd05f9be27d711a20d7e3c82deadc6390570d9d373
|
@@ -26,6 +26,9 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
26
26
|
# The name of a redis key
|
27
27
|
config :key, :validate => :string, :required => true
|
28
28
|
|
29
|
+
# The name of a redis key
|
30
|
+
config :cluster, :validate => :boolean, :default => true
|
31
|
+
|
29
32
|
public
|
30
33
|
def register
|
31
34
|
require "redis-clustering"
|
@@ -50,23 +53,24 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
50
53
|
|
51
54
|
private
|
52
55
|
def connect
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
56
|
+
if @cluster
|
57
|
+
Redis.new(cluster:@host)
|
58
|
+
else
|
59
|
+
@current_host, @current_port = @host.split(':')
|
60
|
+
params = {
|
61
|
+
:host => @current_host,
|
62
|
+
:port => @current_port,
|
63
|
+
:timeout => @timeout,
|
64
|
+
:db => @db,
|
65
|
+
}
|
66
|
+
@logger.debug("connection params", params)
|
67
|
+
|
68
|
+
if @password
|
69
|
+
params[:password] = @password.value
|
70
|
+
end
|
71
|
+
|
72
|
+
Redis.new(params)
|
64
73
|
end
|
65
|
-
|
66
|
-
node_list = Array.new
|
67
|
-
node_list << @host
|
68
|
-
|
69
|
-
Redis::Cluster.new(nodes: node_list)
|
70
74
|
end #def connect
|
71
75
|
|
72
76
|
# A string used to identify a Redis instance in log messages
|
@@ -87,5 +91,5 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
87
91
|
@redis = nil
|
88
92
|
retry
|
89
93
|
end
|
90
|
-
|
94
|
+
end #def send_to_redis
|
91
95
|
end # class LogStash::Outputs::Redis
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-redis-increment'
|
3
|
-
s.version = '1.
|
3
|
+
s.version = '1.2.0'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Logstash Output Plugin for RedisIncrement'
|
6
6
|
s.description = 'Logstash Redis Output plugin for incrementing a key from each event.'
|
@@ -19,8 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
# Gem dependencies
|
21
21
|
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
|
22
|
-
s.add_runtime_dependency 'redis', '
|
22
|
+
s.add_runtime_dependency 'redis', '~> 4'
|
23
23
|
s.add_runtime_dependency "logstash-codec-plain"
|
24
|
-
s.add_runtime_dependency "redis-clustering"
|
25
24
|
s.add_development_dependency "logstash-devutils"
|
26
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-redis-increment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Vinciguerra
|
@@ -11,70 +11,56 @@ cert_chain: []
|
|
11
11
|
date: 2022-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: logstash-core-plugin-api
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: '2.0'
|
20
|
-
|
19
|
+
name: logstash-core-plugin-api
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: redis
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
|
-
- -
|
30
|
+
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
|
32
|
+
version: '4'
|
33
|
+
name: redis
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 5.0.5
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: logstash-codec-plain
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
35
|
type: :runtime
|
49
|
-
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- - "
|
38
|
+
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
40
|
+
version: '4'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: redis-clustering
|
57
42
|
requirement: !ruby/object:Gem::Requirement
|
58
43
|
requirements:
|
59
44
|
- - ">="
|
60
45
|
- !ruby/object:Gem::Version
|
61
46
|
version: '0'
|
62
|
-
|
47
|
+
name: logstash-codec-plain
|
63
48
|
prerelease: false
|
49
|
+
type: :runtime
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: logstash-devutils
|
71
56
|
requirement: !ruby/object:Gem::Requirement
|
72
57
|
requirements:
|
73
58
|
- - ">="
|
74
59
|
- !ruby/object:Gem::Version
|
75
60
|
version: '0'
|
76
|
-
|
61
|
+
name: logstash-devutils
|
77
62
|
prerelease: false
|
63
|
+
type: :development
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - ">="
|
@@ -116,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
requirements: []
|
119
|
-
rubygems_version: 3.
|
105
|
+
rubygems_version: 3.2.33
|
120
106
|
signing_key:
|
121
107
|
specification_version: 4
|
122
108
|
summary: Logstash Output Plugin for RedisIncrement
|