logstash-input-beats 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/inputs/beats.rb +2 -2
- data/logstash-input-beats.gemspec +1 -1
- data/spec/inputs/beats_spec.rb +13 -7
- 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: 3394e299d7c7ecf132134ebed27de22b49d2bdc2
|
4
|
+
data.tar.gz: 3e92f0bdb6b00a5d28955673a647099dfe905d4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e2456b1703cf75ab2724fa61014d8dc0e1b56bdaf05045ab06bef319f0511a99de7627bb581c39e2296d9468c7f2399a770c2c59f115de6a7353b0cfca46605
|
7
|
+
data.tar.gz: 3ce48912d957e5539ba445b0580ef7e312f0d57b961a40247146fbf63d72778a2035bbb1ed25ceb0f3904b5ff4c06d7cb20373961a926d3a36161fcf7f503289
|
data/CHANGELOG.md
CHANGED
@@ -217,9 +217,9 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
|
|
217
217
|
while !stop?
|
218
218
|
@output_queue << @buffered_queue.take
|
219
219
|
end
|
220
|
-
rescue
|
220
|
+
rescue java.lang.InterruptedException => e
|
221
221
|
# If we are shutting down without waiting the queue to unblock
|
222
|
-
# we will get an `InterruptionException` in that context we will not log it.
|
222
|
+
# we will get an `java.lang.InterruptionException` in that context we will not log it.
|
223
223
|
@logger.error("Beats input: bufferered queue exception", :exception => e) unless stop?
|
224
224
|
rescue => e
|
225
225
|
@logger.error("Beats input: unexpected exception", :exception => e)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "logstash-input-beats"
|
3
|
-
s.version = "2.1.
|
3
|
+
s.version = "2.1.2"
|
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
@@ -93,7 +93,9 @@ describe LogStash::Inputs::Beats do
|
|
93
93
|
plugin.run(pipeline_queue)
|
94
94
|
end
|
95
95
|
|
96
|
-
|
96
|
+
# Give a bit of time to the server to correctly
|
97
|
+
# start the thread.
|
98
|
+
sleep(1)
|
97
99
|
end
|
98
100
|
|
99
101
|
after :each do
|
@@ -107,12 +109,16 @@ describe LogStash::Inputs::Beats do
|
|
107
109
|
end
|
108
110
|
|
109
111
|
it "calls flush on the handler and tag the events" do
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
# try multiples times to make sure the
|
113
|
+
# thread containing the `#run` is correctly started.
|
114
|
+
try do
|
115
|
+
expect(connection_handler).to receive(:accept) { raise LogStash::Inputs::Beats::InsertingToQueueTakeTooLong }
|
116
|
+
expect(connection_handler).to receive(:flush).and_yield(LogStash::Event.new)
|
117
|
+
plugin.handle_new_connection(connection)
|
118
|
+
|
119
|
+
event = pipeline_queue.shift
|
120
|
+
expect(event["tags"]).to include("beats_input_flushed_by_end_of_connection")
|
121
|
+
end
|
116
122
|
end
|
117
123
|
end
|
118
124
|
end
|