logstash-output-redis-increment 0.8.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c25ca82f405ca91ada301b2683811d16abfddb54400c005b21a38be66730305c
4
- data.tar.gz: f3168524782874df9fc0a0d08bf396bee3c964a778df0550a82bd09d0622e138
3
+ metadata.gz: 1c01371b89f079b054bf731322dc9837ba6842b831166b6209eca7f5cb99bb06
4
+ data.tar.gz: db90d9f54cf14a1a6cbd8ebbd7910781ae7fa5d6db4e2be253affeb83c2d7917
5
5
  SHA512:
6
- metadata.gz: d5cbe0f6493d562037220605f5e4c25617524c771fb87c512825a2d8f15f1e99f0a6b5dc5320ccfa816e2a9210d09131d8630466acee0676ce2e76366860d2ff
7
- data.tar.gz: 52d28253bf099cb1b88a205160d07984133b02486768f12235c156a5b0a0ea80bc4162e4808fbabf7e2f83233f6f0ef59d3cf535d89f98fcd97116c59d3a15f7
6
+ metadata.gz: f532cae7c9519cb5f1067b88c0680f2522b3746d2b00dbd8f0e39122a7194d4d953357dd73ab932cc4aabe4b51bc6b95ee2d77ed5061122ba21aca1c74b8f58a
7
+ data.tar.gz: 9432450da5268bb6b50f6ec59b219111afbbfd5b6dfebbdc4fbdb8d3714f1799b2bce6b8b7a7ad7c4908802e989bbd23ac2b9bf3e5c13cf5918d2190fabca2fb
@@ -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,23 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
50
53
 
51
54
  private
52
55
  def connect
53
- @current_host, @current_port = @host.split(':')
54
- params = {
55
- :host => @current_host,
56
- :port => @current_port,
57
- :timeout => @timeout,
58
- :db => @db,
59
- }
60
- @logger.debug("connection params", params)
61
-
62
- if @password
63
- params[:password] = @password.value
64
- end
65
-
66
- node_list = Array.new
67
- node_list << @host
68
-
69
- Redis::Cluster.new(nodes: node_list)
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)
70
73
  end #def connect
71
74
 
72
75
  # A string used to identify a Redis instance in log messages
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-redis-increment'
3
- s.version = '0.8.0'
3
+ s.version = '1.1.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', '5.0.5'
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: 0.8.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Vinciguerra
@@ -27,17 +27,17 @@ dependencies:
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - '='
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 5.0.5
32
+ version: '4'
33
33
  name: redis
34
34
  prerelease: false
35
35
  type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.0.5
40
+ version: '4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- name: redis-clustering
62
- prerelease: false
63
- type: :runtime
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  requirement: !ruby/object:Gem::Requirement
71
57
  requirements: