logstash-input-delf 3.0.3 → 3.1.3

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: 308100753a50a0d7d3c0a9956ce41ee9c001f62d
4
- data.tar.gz: c8c424269c039b12f4195a610753af6c5ef183d6
3
+ metadata.gz: 8efb4dfb5892d770ffe3cb92f89c137ee4a5de3a
4
+ data.tar.gz: d8aa798b5e78fcdf0f4d1434a957fdda9d3721ce
5
5
  SHA512:
6
- metadata.gz: 31c2835ee3bc1e0b218e50f2fc103ee9e757dcbcd669cea2a440932805cbb777ffa5ffab2085743d6a767b06c0a06398932758c437906ff49a9f9da29dbbfc5f
7
- data.tar.gz: f516dbccce766aed7e57347625ffabd9c1a632f3058d87002f3897494761576259d94118b601bb88b7f6ef1819bc81c83c56261b80ca00567d9651412dc625ef
6
+ metadata.gz: b58ce6725fe8e6a93c41504056cf8382bb2c3c924a542b858a9738bb7eabb1dffeab2f51bb15eea7941f153ddf50bfcaaa07f08fd1dfbd44d412116a1eea9136
7
+ data.tar.gz: fc2f4f532136ba8031558d830fa3b77c925b8cc71e4d96824d4d360c889ecd23a3061bc47b839f9272cc662eed11ed0152026f5e0aedefe95e219c13834a514a
@@ -5,6 +5,7 @@ require "logstash/json"
5
5
  require "logstash/timestamp"
6
6
  require "stud/interval"
7
7
  require "date"
8
+ require "base64"
8
9
  require "socket"
9
10
 
10
11
  # This input will read GELF messages as events over the network,
@@ -34,7 +35,7 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
34
35
  config :port, :validate => :number, :default => 12201
35
36
 
36
37
  # The incomplete mark, line ends with this mark will be considered as a incomplete event
37
- config :continue_mark, :validate => :string, :default => "\\"
38
+ config :continue_mark_base64, :validate => :string, :default => "XA=="
38
39
 
39
40
  # The field to identify different event stream, for Docker events, it's 'container_id'
40
41
  config :track, :validate => :string, :default => 'container_id'
@@ -82,6 +83,7 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
82
83
  private
83
84
  def udp_listener(output_queue)
84
85
  @logger.info("Starting delf listener", :address => "#{@host}:#{@port}")
86
+ @continue_mark = Base64.urlsafe_decode64(@continue_mark_base64)
85
87
 
86
88
  @udp = UDPSocket.new(Socket::AF_INET)
87
89
  @udp.bind(@host, @port)
@@ -199,6 +201,9 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
199
201
  message = event.get("message")
200
202
  return event unless message.kind_of?(String)
201
203
 
204
+ # strip right
205
+ message = message.rstrip
206
+
202
207
  # Fetch last event
203
208
  last_event = @incomplete_events[track_id]
204
209
 
@@ -214,7 +219,7 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
214
219
  return nil
215
220
  else
216
221
  # append content to pending event
217
- last_event.set("message", last_event.get("message") + "\n" + message)
222
+ last_event.set("message", last_event.get("message") + "\r\n" + message)
218
223
  # limit message length to 5000
219
224
  if last_event.get("message").length > 5000
220
225
  @incomplete_events[track_id] = nil
@@ -230,7 +235,7 @@ class LogStash::Inputs::Delf < LogStash::Inputs::Base
230
235
  return event
231
236
  else
232
237
  # append content to pending incomplete event and return it
233
- last_event.set("message", last_event.get("message") + "\n" + message)
238
+ last_event.set("message", last_event.get("message") + "\r\n" + message)
234
239
  # clear the pending incomplete event
235
240
  @incomplete_events[track_id] = nil
236
241
  return last_event
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-delf'
4
- s.version = '3.0.3'
4
+ s.version = '3.1.3'
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"
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-delf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - ">="
@@ -19,9 +20,8 @@ dependencies:
19
20
  - - "<="
20
21
  - !ruby/object:Gem::Version
21
22
  version: '2.99'
22
- name: logstash-core-plugin-api
23
- prerelease: false
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
@@ -31,90 +31,92 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.99'
33
33
  - !ruby/object:Gem::Dependency
34
+ name: gelfd
34
35
  requirement: !ruby/object:Gem::Requirement
35
36
  requirements:
36
37
  - - '='
37
38
  - !ruby/object:Gem::Version
38
39
  version: 0.2.0
39
- name: gelfd
40
- prerelease: false
41
40
  type: :runtime
41
+ prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - '='
45
45
  - !ruby/object:Gem::Version
46
46
  version: 0.2.0
47
47
  - !ruby/object:Gem::Dependency
48
+ name: logstash-codec-plain
48
49
  requirement: !ruby/object:Gem::Requirement
49
50
  requirements:
50
51
  - - ">="
51
52
  - !ruby/object:Gem::Version
52
53
  version: '0'
53
- name: logstash-codec-plain
54
- prerelease: false
55
54
  type: :runtime
55
+ prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
+ name: stud
62
63
  requirement: !ruby/object:Gem::Requirement
63
64
  requirements:
64
65
  - - "~>"
65
66
  - !ruby/object:Gem::Version
66
67
  version: 0.0.22
67
- name: stud
68
- prerelease: false
69
68
  type: :runtime
69
+ prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: 0.0.22
75
75
  - !ruby/object:Gem::Dependency
76
+ name: logstash-devutils
76
77
  requirement: !ruby/object:Gem::Requirement
77
78
  requirements:
78
79
  - - ">="
79
80
  - !ruby/object:Gem::Version
80
81
  version: '0'
81
- name: logstash-devutils
82
- prerelease: false
83
82
  type: :development
83
+ prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
+ name: gelf
90
91
  requirement: !ruby/object:Gem::Requirement
91
92
  requirements:
92
93
  - - '='
93
94
  - !ruby/object:Gem::Version
94
95
  version: 1.3.2
95
- name: gelf
96
- prerelease: false
97
96
  type: :development
97
+ prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
102
  version: 1.3.2
103
103
  - !ruby/object:Gem::Dependency
104
+ name: flores
104
105
  requirement: !ruby/object:Gem::Requirement
105
106
  requirements:
106
107
  - - ">="
107
108
  - !ruby/object:Gem::Version
108
109
  version: '0'
109
- name: flores
110
- prerelease: false
111
110
  type: :development
111
+ prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
- 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
117
+ description: This gem is a Logstash plugin required to be installed on top of the
118
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
119
+ gem is not a stand-alone program
118
120
  email: info@elastic.co
119
121
  executables: []
120
122
  extensions: []
@@ -137,7 +139,7 @@ licenses:
137
139
  metadata:
138
140
  logstash_plugin: 'true'
139
141
  logstash_group: input
140
- post_install_message:
142
+ post_install_message:
141
143
  rdoc_options: []
142
144
  require_paths:
143
145
  - lib
@@ -152,11 +154,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
154
  - !ruby/object:Gem::Version
153
155
  version: '0'
154
156
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.4.8
157
- signing_key:
157
+ rubyforge_project:
158
+ rubygems_version: 2.6.11
159
+ signing_key:
158
160
  specification_version: 4
159
- summary: This input will read GELF messages as events over the network, making it a good choice if you already use Graylog2 today.
161
+ summary: This input will read GELF messages as events over the network, making it
162
+ a good choice if you already use Graylog2 today.
160
163
  test_files:
161
164
  - spec/inputs/delf_spec.rb
162
165
  - spec/support/helpers.rb