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 +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/logstash/inputs/beats.rb +5 -1
- data/logstash-input-beats.gemspec +1 -1
- data/spec/inputs/beats_spec.rb +10 -0
- 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: 1aed7cc18f6010a5e6e40d4dfa62c073dc3bd512
|
4
|
+
data.tar.gz: ed5565a612454c4905fa48edc7c6482af02a5008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa7854d4255d44ca06916883f3cc24e78b0c778d6503d9d3b91c37d3b5e99e769474e12224ce5d226eaa4b56dca83083f1cd1d57a499557b3960b550a0d714e1
|
7
|
+
data.tar.gz: c423e548a02defb63de98ea6f65a3e339a0f55423d19b08b92af71fb033ebe8da7e1c0fd3add8b31f84b6c1f73699a57893fda9b6205ab3177d47656ba599edb
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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.
|
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"
|
data/spec/inputs/beats_spec.rb
CHANGED
@@ -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
|
|