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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8efb4dfb5892d770ffe3cb92f89c137ee4a5de3a
4
- data.tar.gz: d8aa798b5e78fcdf0f4d1434a957fdda9d3721ce
3
+ metadata.gz: 6df73300e7dbd8825b85c33846a1627d14df96fc
4
+ data.tar.gz: af723417589431a3f7f6847df2ed2406b75c9b41
5
5
  SHA512:
6
- metadata.gz: b58ce6725fe8e6a93c41504056cf8382bb2c3c924a542b858a9738bb7eabb1dffeab2f51bb15eea7941f153ddf50bfcaaa07f08fd1dfbd44d412116a1eea9136
7
- data.tar.gz: fc2f4f532136ba8031558d830fa3b77c925b8cc71e4d96824d4d360c889ecd23a3061bc47b839f9272cc662eed11ed0152026f5e0aedefe95e219c13834a514a
6
+ metadata.gz: 5c948e95e03484263c63338559c1202ca5d39ae7d0b2df97d487befb72fca20d9d79d5a2682a4d559bb880c5fe556e32b794abeebf2c572311453a6a9c839158
7
+ data.tar.gz: 553e1d34f1f886d84ecdfe6f3a65898ac3a4a063328dbfb216a3c3d891a619818f6a533e6377e2e3eceb08d6c8936cabe55b76767cd43a2d25bd7ddf0c643345
@@ -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 > 5000
227
+ if last_event.get("message").length > @max_length
225
228
  @incomplete_events[track_id] = nil
226
229
  return last_event
227
230
  else
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-delf'
4
- s.version = '3.1.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"
@@ -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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-delf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: '3.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic