logstash-input-redis 3.1.6 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE +1 -1
- data/docs/index.asciidoc +30 -10
- data/lib/logstash/inputs/redis.rb +25 -5
- data/logstash-input-redis.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5ca1b4f974fd36628fc9b373286d19520cd6ee12455318b8b4c5d8daff2b5dd
|
4
|
+
data.tar.gz: 92af4b527141a270f7fbe52be1b4678663a4f3bef516cdbd14e6d5e23a8b14d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0c8c0b22ca9dff8ef290bc390e520eb7185163ab9c1aaf988c825a4b197c0dda666b3fa768087d7e82df83998da7dc43a935ff9da7dce1c038f61f7ecbc1671
|
7
|
+
data.tar.gz: 120a42989ff5cb251f9c79eb2d7864391b561830c73f95a8374a2a7173855d895ef1866d8ff8765fd627a7622f15997dd9706b0db1a5a2ce1eaf8db84f86c22d
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -45,9 +45,11 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
45
45
|
| <<plugins-{type}s-{plugin}-data_type>> |<<string,string>>, one of `["list", "channel", "pattern_channel"]`|Yes
|
46
46
|
| <<plugins-{type}s-{plugin}-db>> |<<number,number>>|No
|
47
47
|
| <<plugins-{type}s-{plugin}-host>> |<<string,string>>|No
|
48
|
+
| <<plugins-{type}s-{plugin}-path>> |<<string,string>>|No
|
48
49
|
| <<plugins-{type}s-{plugin}-key>> |<<string,string>>|Yes
|
49
50
|
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
|
50
51
|
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|No
|
52
|
+
| <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|No
|
51
53
|
| <<plugins-{type}s-{plugin}-threads>> |<<number,number>>|No
|
52
54
|
| <<plugins-{type}s-{plugin}-timeout>> |<<number,number>>|No
|
53
55
|
|=======================================================================
|
@@ -58,7 +60,7 @@ input plugins.
|
|
58
60
|
|
59
61
|
|
60
62
|
[id="plugins-{type}s-{plugin}-batch_count"]
|
61
|
-
===== `batch_count`
|
63
|
+
===== `batch_count`
|
62
64
|
|
63
65
|
* Value type is <<number,number>>
|
64
66
|
* Default value is `125`
|
@@ -66,7 +68,7 @@ input plugins.
|
|
66
68
|
The number of events to return from Redis using EVAL.
|
67
69
|
|
68
70
|
[id="plugins-{type}s-{plugin}-data_type"]
|
69
|
-
===== `data_type`
|
71
|
+
===== `data_type`
|
70
72
|
|
71
73
|
* This is a required setting.
|
72
74
|
* Value can be any of: `list`, `channel`, `pattern_channel`
|
@@ -77,7 +79,7 @@ key. If `redis\_type` is `channel`, then we will SUBSCRIBE to the key.
|
|
77
79
|
If `redis\_type` is `pattern_channel`, then we will PSUBSCRIBE to the key.
|
78
80
|
|
79
81
|
[id="plugins-{type}s-{plugin}-db"]
|
80
|
-
===== `db`
|
82
|
+
===== `db`
|
81
83
|
|
82
84
|
* Value type is <<number,number>>
|
83
85
|
* Default value is `0`
|
@@ -85,15 +87,24 @@ If `redis\_type` is `pattern_channel`, then we will PSUBSCRIBE to the key.
|
|
85
87
|
The Redis database number.
|
86
88
|
|
87
89
|
[id="plugins-{type}s-{plugin}-host"]
|
88
|
-
===== `host`
|
90
|
+
===== `host`
|
89
91
|
|
90
92
|
* Value type is <<string,string>>
|
91
93
|
* Default value is `"127.0.0.1"`
|
92
94
|
|
93
95
|
The hostname of your Redis server.
|
94
96
|
|
97
|
+
id="plugins-{type}s-{plugin}-path"]
|
98
|
+
===== `path`
|
99
|
+
|
100
|
+
* Value type is <<string,string>>
|
101
|
+
* There is no default value for this setting.
|
102
|
+
* Path will override Host configuration if both specified.
|
103
|
+
|
104
|
+
The unix socket path of your Redis server.
|
105
|
+
|
95
106
|
[id="plugins-{type}s-{plugin}-key"]
|
96
|
-
===== `key`
|
107
|
+
===== `key`
|
97
108
|
|
98
109
|
* This is a required setting.
|
99
110
|
* Value type is <<string,string>>
|
@@ -102,7 +113,7 @@ The hostname of your Redis server.
|
|
102
113
|
The name of a Redis list or channel.
|
103
114
|
|
104
115
|
[id="plugins-{type}s-{plugin}-password"]
|
105
|
-
===== `password`
|
116
|
+
===== `password`
|
106
117
|
|
107
118
|
* Value type is <<password,password>>
|
108
119
|
* There is no default value for this setting.
|
@@ -110,15 +121,24 @@ The name of a Redis list or channel.
|
|
110
121
|
Password to authenticate with. There is no authentication by default.
|
111
122
|
|
112
123
|
[id="plugins-{type}s-{plugin}-port"]
|
113
|
-
===== `port`
|
124
|
+
===== `port`
|
114
125
|
|
115
126
|
* Value type is <<number,number>>
|
116
127
|
* Default value is `6379`
|
117
128
|
|
118
129
|
The port to connect on.
|
119
130
|
|
131
|
+
[id="plugins-{type}s-{plugin}-ssl"]
|
132
|
+
===== `ssl`
|
133
|
+
|
134
|
+
* Value type is <<boolean,boolean>>
|
135
|
+
* Default value is `false`
|
136
|
+
|
137
|
+
Enable SSL support.
|
138
|
+
|
139
|
+
|
120
140
|
[id="plugins-{type}s-{plugin}-threads"]
|
121
|
-
===== `threads`
|
141
|
+
===== `threads`
|
122
142
|
|
123
143
|
* Value type is <<number,number>>
|
124
144
|
* Default value is `1`
|
@@ -126,7 +146,7 @@ The port to connect on.
|
|
126
146
|
|
127
147
|
|
128
148
|
[id="plugins-{type}s-{plugin}-timeout"]
|
129
|
-
===== `timeout`
|
149
|
+
===== `timeout`
|
130
150
|
|
131
151
|
* Value type is <<number,number>>
|
132
152
|
* Default value is `5`
|
@@ -136,4 +156,4 @@ Initial connection timeout in seconds.
|
|
136
156
|
|
137
157
|
|
138
158
|
[id="plugins-{type}s-{plugin}-common-options"]
|
139
|
-
include::{include_path}/{type}.asciidoc[]
|
159
|
+
include::{include_path}/{type}.asciidoc[]
|
@@ -29,6 +29,13 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable
|
|
29
29
|
# The port to connect on.
|
30
30
|
config :port, :validate => :number, :default => 6379
|
31
31
|
|
32
|
+
# SSL
|
33
|
+
config :ssl, :validate => :boolean, :default => false
|
34
|
+
|
35
|
+
# The unix socket path to connect on. Will override host and port if defined.
|
36
|
+
# There is no unix socket path by default.
|
37
|
+
config :path, :validate => :string
|
38
|
+
|
32
39
|
# The Redis database number.
|
33
40
|
config :db, :validate => :number, :default => 0
|
34
41
|
|
@@ -68,7 +75,7 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable
|
|
68
75
|
end
|
69
76
|
|
70
77
|
def register
|
71
|
-
@redis_url = "redis://#{@password}@#{@host}:#{@port}/#{@db}"
|
78
|
+
@redis_url = @path.nil? ? "redis://#{@password}@#{@host}:#{@port}/#{@db}" : "#{@password}@#{@path}/#{@db}"
|
72
79
|
|
73
80
|
@redis_builder ||= method(:internal_redis_builder)
|
74
81
|
|
@@ -114,13 +121,26 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable
|
|
114
121
|
|
115
122
|
# private
|
116
123
|
def redis_params
|
117
|
-
|
118
|
-
|
119
|
-
|
124
|
+
if @path.nil?
|
125
|
+
connectionParams = {
|
126
|
+
:host => @host,
|
127
|
+
:port => @port
|
128
|
+
}
|
129
|
+
else
|
130
|
+
@logger.warn("Parameter 'path' is set, ignoring parameters: 'host' and 'port'")
|
131
|
+
connectionParams = {
|
132
|
+
:path => @path
|
133
|
+
}
|
134
|
+
end
|
135
|
+
|
136
|
+
baseParams = {
|
120
137
|
:timeout => @timeout,
|
121
138
|
:db => @db,
|
122
|
-
:password => @password.nil? ? nil : @password.value
|
139
|
+
:password => @password.nil? ? nil : @password.value,
|
140
|
+
:ssl => @ssl
|
123
141
|
}
|
142
|
+
|
143
|
+
return connectionParams.merge(baseParams)
|
124
144
|
end
|
125
145
|
|
126
146
|
# private
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-redis'
|
4
|
-
s.version = '3.
|
4
|
+
s.version = '3.2.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Reads events from a Redis instance"
|
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-input-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.6.
|
115
|
+
rubygems_version: 2.6.13
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Reads events from a Redis instance
|