logstash-output-redis 3.0.5 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -2
- data/docs/index.asciidoc +2 -21
- data/lib/logstash/outputs/redis.rb +5 -27
- data/logstash-output-redis.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90bf407558132b84780ba559b7f3ff82571ca80e
|
4
|
+
data.tar.gz: e50d4dc796ba4475033b71d415a03bde5edae3af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7be387bf6b017efac53dcb654cdcfb33f56a0b93d720b942ca982cd22bf414f288863060e89ecb962bd9b5b0beed4981e891579888ae79288295bca8170963b
|
7
|
+
data.tar.gz: be7c7a0f750e79d8fa53ae1c04fb3ab8b63906f4b09fc2a90cd805f41329f5ff450e862fa4829ee3bbcc3b444677bdc6d79d3ae81fc2708c83bc37b1f62bbb88
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -119,8 +119,8 @@ Only supported for `list` Redis `data_type`.
|
|
119
119
|
* Value can be any of: `list`, `channel`
|
120
120
|
* There is no default value for this setting.
|
121
121
|
|
122
|
-
Either list or channel. If `
|
123
|
-
RPUSH to key. If `
|
122
|
+
Either list or channel. If `data_type` is list, then we will set
|
123
|
+
RPUSH to key. If `data_type` is channel, then we will PUBLISH to `key`.
|
124
124
|
|
125
125
|
[id="plugins-{type}s-{plugin}-db"]
|
126
126
|
===== `db`
|
@@ -156,15 +156,6 @@ For example:
|
|
156
156
|
The name of a Redis list or channel. Dynamic names are
|
157
157
|
valid here, for example `logstash-%{type}`.
|
158
158
|
|
159
|
-
[id="plugins-{type}s-{plugin}-name"]
|
160
|
-
===== `name` (DEPRECATED)
|
161
|
-
|
162
|
-
* DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
|
163
|
-
* Value type is <<string,string>>
|
164
|
-
* Default value is `"default"`
|
165
|
-
|
166
|
-
Name is used for logging in case there are multiple instances.
|
167
|
-
|
168
159
|
[id="plugins-{type}s-{plugin}-password"]
|
169
160
|
===== `password`
|
170
161
|
|
@@ -181,16 +172,6 @@ Password to authenticate with. There is no authentication by default.
|
|
181
172
|
|
182
173
|
The default port to connect on. Can be overridden on any hostname.
|
183
174
|
|
184
|
-
[id="plugins-{type}s-{plugin}-queue"]
|
185
|
-
===== `queue` (DEPRECATED)
|
186
|
-
|
187
|
-
* DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
|
188
|
-
* Value type is <<string,string>>
|
189
|
-
* There is no default value for this setting.
|
190
|
-
|
191
|
-
The name of the Redis queue (we'll use RPUSH on this). Dynamic names are
|
192
|
-
valid here, for example `logstash-%{type}`
|
193
|
-
|
194
175
|
[id="plugins-{type}s-{plugin}-reconnect_interval"]
|
195
176
|
===== `reconnect_interval`
|
196
177
|
|
@@ -21,8 +21,7 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
21
21
|
default :codec, "json"
|
22
22
|
|
23
23
|
# Name is used for logging in case there are multiple instances.
|
24
|
-
config :name, :validate => :string, :
|
25
|
-
:deprecated => true
|
24
|
+
config :name, :validate => :string, :obsolete => "This option is obsolete"
|
26
25
|
|
27
26
|
# The hostname(s) of your Redis server(s). Ports may be specified on any
|
28
27
|
# hostname, which will override the global port config.
|
@@ -51,17 +50,15 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
51
50
|
# Password to authenticate with. There is no authentication by default.
|
52
51
|
config :password, :validate => :password
|
53
52
|
|
54
|
-
|
55
|
-
# valid here, for example `logstash-%{type}`
|
56
|
-
config :queue, :validate => :string, :deprecated => true
|
53
|
+
config :queue, :validate => :string, :obsolete => "This option is obsolete. Use `key` and `data_type`."
|
57
54
|
|
58
55
|
# The name of a Redis list or channel. Dynamic names are
|
59
56
|
# valid here, for example `logstash-%{type}`.
|
60
|
-
config :key, :validate => :string, :required =>
|
57
|
+
config :key, :validate => :string, :required => true
|
61
58
|
|
62
59
|
# Either list or channel. If `redis_type` is list, then we will set
|
63
60
|
# RPUSH to key. If `redis_type` is channel, then we will PUBLISH to `key`.
|
64
|
-
config :data_type, :validate => [ "list", "channel" ], :required =>
|
61
|
+
config :data_type, :validate => [ "list", "channel" ], :required => true
|
65
62
|
|
66
63
|
# Set to true if you want Redis to batch up values and send 1 RPUSH command
|
67
64
|
# instead of one command per value to push on the list. Note that this only
|
@@ -98,25 +95,6 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
98
95
|
def register
|
99
96
|
require 'redis'
|
100
97
|
|
101
|
-
# TODO remove after setting key and data_type to true
|
102
|
-
if @queue
|
103
|
-
if @key or @data_type
|
104
|
-
raise RuntimeError.new(
|
105
|
-
"Cannot specify queue parameter and key or data_type"
|
106
|
-
)
|
107
|
-
end
|
108
|
-
@key = @queue
|
109
|
-
@data_type = 'list'
|
110
|
-
end
|
111
|
-
|
112
|
-
if not @key or not @data_type
|
113
|
-
raise RuntimeError.new(
|
114
|
-
"Must define queue, or key and data_type parameters"
|
115
|
-
)
|
116
|
-
end
|
117
|
-
# end TODO
|
118
|
-
|
119
|
-
|
120
98
|
if @batch
|
121
99
|
if @data_type != "list"
|
122
100
|
raise RuntimeError.new(
|
@@ -224,7 +202,7 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
|
|
224
202
|
|
225
203
|
# A string used to identify a Redis instance in log messages
|
226
204
|
def identity
|
227
|
-
|
205
|
+
"redis://#{@password}@#{@current_host}:#{@current_port}/#{@db} #{@data_type}:#{@key}"
|
228
206
|
end
|
229
207
|
|
230
208
|
def send_to_redis(event, payload)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-redis'
|
4
|
-
s.version = '
|
4
|
+
s.version = '4.0.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This output will send events to a Redis queue using RPUSH"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|