logstash-input-beats 0.9.5 → 0.9.6

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: a1928912b4fa3eff1a9847c2fbd9a256cb0dce14
4
- data.tar.gz: a032d7e5516ad64137817df50c9f28a31db86e76
3
+ metadata.gz: 1aed7cc18f6010a5e6e40d4dfa62c073dc3bd512
4
+ data.tar.gz: ed5565a612454c4905fa48edc7c6482af02a5008
5
5
  SHA512:
6
- metadata.gz: c5e62b46628ce97cf9d7efbf196818f0af2752b193ad1f03362d29ca11d849d3f4c566386d0303ebe9e1791b7cc019ff971a37c98ba8cca6f1b39a82428e2ad7
7
- data.tar.gz: dd3f53e083e6bdd0bc4dc23a5349c2ba7277311cbaa7862009136ed0be353e1c0cb1a329d5c29a81715f29a2b549abc0959f5f54b9d0449e7f252b6e70fa51c2
6
+ metadata.gz: fa7854d4255d44ca06916883f3cc24e78b0c778d6503d9d3b91c37d3b5e99e769474e12224ce5d226eaa4b56dca83083f1cd1d57a499557b3960b550a0d714e1
7
+ data.tar.gz: c423e548a02defb63de98ea6f65a3e339a0f55423d19b08b92af71fb033ebe8da7e1c0fd3add8b31f84b6c1f73699a57893fda9b6205ab3177d47656ba599edb
@@ -1,3 +1,5 @@
1
+ # 0.9.6
2
+ - Fix an issue with rogue events created by buffered codecs #19
1
3
  # 0.9.5
2
4
  - Set concurrent-ruby to 0.9.1 see https://github.com/elastic/logstash/issues/4141
3
5
  # 0.9.4
@@ -144,6 +144,7 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
144
144
  return decoded
145
145
  end
146
146
  end
147
+ return nil
147
148
  end
148
149
 
149
150
  private
@@ -165,7 +166,10 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
165
166
  begin
166
167
  # If any errors occur in from the events the connection should be closed in the
167
168
  # library ensure block and the exception will be handled here
168
- connection.run { |map| block.call(create_event(codec, map)) }
169
+ connection.run do |map|
170
+ event = create_event(codec, map)
171
+ block.call(event) unless event.nil?
172
+ end
169
173
 
170
174
  # When too many errors happen inside the circuit breaker it will throw
171
175
  # this exception and start refusing connection. The bubbling of theses
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "logstash-input-beats"
3
- s.version = "0.9.5"
3
+ s.version = "0.9.6"
4
4
  s.licenses = ["Apache License (2.0)"]
5
5
  s.summary = "Receive events using the lumberjack protocol."
6
6
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -120,6 +120,16 @@ describe LogStash::Inputs::Beats do
120
120
  expect(event["tags"]).to include("bonjour")
121
121
  end
122
122
  end
123
+
124
+ context "when data is buffered in the codec" do
125
+ let(:codec) { LogStash::Codecs::Multiline.new("pattern" => '^\s', "what" => "previous") }
126
+ let(:event_map) { {"message" => "hello?", "tags" => ["syslog"]} }
127
+
128
+ it "retuns nil" do
129
+ event = beats.create_event(beats.codec, event_map)
130
+ expect(event).to be_nil
131
+ end
132
+ end
123
133
  end
124
134
  end
125
135
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-beats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic