logstash-input-delf 3.1.3 → 3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/inputs/delf.rb +4 -1
- data/logstash-input-delf.gemspec +1 -1
- data/spec/inputs/delf_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6df73300e7dbd8825b85c33846a1627d14df96fc
|
4
|
+
data.tar.gz: af723417589431a3f7f6847df2ed2406b75c9b41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c948e95e03484263c63338559c1202ca5d39ae7d0b2df97d487befb72fca20d9d79d5a2682a4d559bb880c5fe556e32b794abeebf2c572311453a6a9c839158
|
7
|
+
data.tar.gz: 553e1d34f1f886d84ecdfe6f3a65898ac3a4a063328dbfb216a3c3d891a619818f6a533e6377e2e3eceb08d6c8936cabe55b76767cd43a2d25bd7ddf0c643345
|
data/lib/logstash/inputs/delf.rb
CHANGED
@@ -40,6 +40,9 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
|
|
40
40
|
# The field to identify different event stream, for Docker events, it's 'container_id'
|
41
41
|
config :track, :validate => :string, :default => 'container_id'
|
42
42
|
|
43
|
+
# max chars in a multi-line message
|
44
|
+
config :max_length, :validate => :number, :default => 10000
|
45
|
+
|
43
46
|
RECONNECT_BACKOFF_SLEEP = 5
|
44
47
|
TIMESTAMP_GELF_FIELD = "timestamp".freeze
|
45
48
|
SOURCE_HOST_FIELD = "source_host".freeze
|
@@ -221,7 +224,7 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
|
|
221
224
|
# append content to pending event
|
222
225
|
last_event.set("message", last_event.get("message") + "\r\n" + message)
|
223
226
|
# limit message length to 5000
|
224
|
-
if last_event.get("message").length >
|
227
|
+
if last_event.get("message").length > @max_length
|
225
228
|
@incomplete_events[track_id] = nil
|
226
229
|
return last_event
|
227
230
|
else
|
data/logstash-input-delf.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-delf'
|
4
|
-
s.version = '3.
|
4
|
+
s.version = '3.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This input will read GELF messages as events over the network, making it a good choice if you already use Graylog2 today."
|
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"
|
data/spec/inputs/delf_spec.rb
CHANGED
@@ -150,9 +150,9 @@ describe LogStash::Inputs::Delf do
|
|
150
150
|
insist { events[1].get("container_id") } == "dummy2"
|
151
151
|
insist { events[1].get("message") } == "single2"
|
152
152
|
insist { events[2].get("container_id") } == "dummy2"
|
153
|
-
insist { events[2].get("message") } == "multi2\nmulti4\nmulti5"
|
153
|
+
insist { events[2].get("message") } == "multi2\r\nmulti4\r\nmulti5"
|
154
154
|
insist { events[3].get("container_id") } == "dummy1"
|
155
|
-
insist { events[3].get("message") } == "multi1\nmulti3\nmulti6"
|
155
|
+
insist { events[3].get("message") } == "multi1\r\nmulti3\r\nmulti6"
|
156
156
|
insist { events[4].get("container_id") } == "dummy2"
|
157
157
|
insist { events[4].get("message") } == "single3"
|
158
158
|
insist { events[5].get("container_id") } == "dummy1"
|