logstash-input-beats 6.8.0-java → 6.8.2-java
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 +6 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/logstash/inputs/beats/message_listener.rb +5 -5
- data/lib/logstash-input-beats_jars.rb +1 -1
- data/lib/tasks/test.rake +1 -14
- data/logstash-input-beats.gemspec +1 -1
- data/spec/inputs/beats/message_listener_spec.rb +1 -1
- data/vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/{6.8.0/logstash-input-beats-6.8.0.jar → 6.8.2/logstash-input-beats-6.8.2.jar} +0 -0
- metadata +3 -5
- data/spec/integration/logstash_forwarder_spec.rb +0 -108
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f20a980ceb322c256f538cd09e3252e941dccd0b617ca9106f368de126ded6b8
|
4
|
+
data.tar.gz: d276eeec91afd043c8641b08d3966fed03e376821a0733a45f6b516af694cd95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c97ea65a121c5d2785501860658ff164c22fc7d7cf4fcf6019b67030ef9f5486a7180a270e7ef9a1e6bd2c9abf295eafd6afe7c05c54a89d966f8add5fb1d09e
|
7
|
+
data.tar.gz: 553f4071eaa277808decad0945ab2537d6a5cdc745621e455f953bea9497d848b70bee800553a26a20883ecb5fc4b296c7d0bf7555f707399436cc080b6ae326
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 6.8.2
|
2
|
+
- Remove Logstash forwarder test cases and add Lumberjack test cases [#488](https://github.com/logstash-plugins/logstash-input-beats/pull/488)
|
3
|
+
|
4
|
+
## 6.8.1
|
5
|
+
- Added logging the best Netty's `maxOrder` setting when big payload trigger an unpooled allocation [#493](https://github.com/logstash-plugins/logstash-input-beats/pull/493)
|
6
|
+
|
1
7
|
## 6.8.0
|
2
8
|
- Introduce expert only `event_loop_threads` to tune netty event loop threads count [#490](https://github.com/logstash-plugins/logstash-input-beats/pull/490)
|
3
9
|
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/log
|
|
19
19
|
|
20
20
|
## Developing
|
21
21
|
|
22
|
-
### 1. Plugin
|
22
|
+
### 1. Plugin Development and Testing
|
23
23
|
|
24
24
|
#### Code
|
25
25
|
- To get started, you'll need JRuby with the Bundler gem installed.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.8.
|
1
|
+
6.8.2
|
@@ -9,7 +9,7 @@ module LogStash module Inputs class Beats
|
|
9
9
|
include org.logstash.beats.IMessageListener
|
10
10
|
|
11
11
|
FILEBEAT_LOG_LINE_FIELD = "message".freeze
|
12
|
-
|
12
|
+
LUMBERJACK_LINE_FIELD = "line".freeze
|
13
13
|
|
14
14
|
ConnectionState = Struct.new(:ctx, :codec, :ip_address)
|
15
15
|
|
@@ -183,8 +183,8 @@ module LogStash module Inputs class Beats
|
|
183
183
|
def extract_target_field(hash)
|
184
184
|
if from_filebeat?(hash)
|
185
185
|
hash.delete(FILEBEAT_LOG_LINE_FIELD).to_s
|
186
|
-
elsif
|
187
|
-
hash.delete(
|
186
|
+
elsif from_lumberjack?(hash)
|
187
|
+
hash.delete(LUMBERJACK_LINE_FIELD).to_s
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
@@ -192,8 +192,8 @@ module LogStash module Inputs class Beats
|
|
192
192
|
!hash[FILEBEAT_LOG_LINE_FIELD].nil?
|
193
193
|
end
|
194
194
|
|
195
|
-
def
|
196
|
-
!hash[
|
195
|
+
def from_lumberjack?(hash)
|
196
|
+
!hash[LUMBERJACK_LINE_FIELD].nil?
|
197
197
|
end
|
198
198
|
|
199
199
|
def increment_connection_count
|
@@ -8,4 +8,4 @@ require_jar('io.netty', 'netty-transport', '4.1.100.Final')
|
|
8
8
|
require_jar('io.netty', 'netty-handler', '4.1.100.Final')
|
9
9
|
require_jar('io.netty', 'netty-transport-native-unix-common', '4.1.100.Final')
|
10
10
|
require_jar('org.javassist', 'javassist', '3.24.0-GA')
|
11
|
-
require_jar('org.logstash.beats', 'logstash-input-beats', '6.8.
|
11
|
+
require_jar('org.logstash.beats', 'logstash-input-beats', '6.8.2')
|
data/lib/tasks/test.rake
CHANGED
@@ -9,8 +9,6 @@ elsif OS_PLATFORM == "darwin"
|
|
9
9
|
FILEBEAT_URL = "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.6.0-darwin-x86_64.tar.gz"
|
10
10
|
end
|
11
11
|
|
12
|
-
LSF_URL = "https://download.elastic.co/logstash-forwarder/binaries/logstash-forwarder_#{OS_PLATFORM}_amd64"
|
13
|
-
|
14
12
|
require "fileutils"
|
15
13
|
@files=[]
|
16
14
|
|
@@ -27,20 +25,9 @@ namespace :test do
|
|
27
25
|
namespace :integration do
|
28
26
|
task :setup do
|
29
27
|
Rake::Task["test:integration:setup:filebeat"].invoke
|
30
|
-
Rake::Task["test:integration:setup:lsf"].invoke
|
31
28
|
end
|
32
29
|
|
33
30
|
namespace :setup do
|
34
|
-
desc "Download latest stable version of Logstash-forwarder"
|
35
|
-
task :lsf do
|
36
|
-
destination = File.join(VENDOR_PATH, "logstash-forwarder")
|
37
|
-
FileUtils.rm_rf(destination)
|
38
|
-
FileUtils.mkdir_p(destination)
|
39
|
-
download_destination = File.join(destination, "logstash-forwarder")
|
40
|
-
puts "Logstash-forwarder: downloading from #{LSF_URL} to #{download_destination}"
|
41
|
-
download(LSF_URL, download_destination)
|
42
|
-
File.chmod(0755, download_destination)
|
43
|
-
end
|
44
31
|
|
45
32
|
desc "Download nigthly filebeat for integration testing"
|
46
33
|
task :filebeat do
|
@@ -60,7 +47,7 @@ namespace :test do
|
|
60
47
|
end
|
61
48
|
|
62
49
|
# Uncompress all the file from the archive this only work with
|
63
|
-
# one level directory structure and
|
50
|
+
# one level directory structure and filebeat packaging.
|
64
51
|
def untar_all(file, destination)
|
65
52
|
untar(file) do |entry|
|
66
53
|
out = entry.full_name.split("/").last
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_development_dependency "rspec-wait"
|
40
40
|
s.add_development_dependency "logstash-devutils"
|
41
41
|
s.add_development_dependency "logstash-codec-json"
|
42
|
-
s.add_development_dependency "childprocess" # To make filebeat
|
42
|
+
s.add_development_dependency "childprocess" # To make filebeat integration test easier to write.
|
43
43
|
|
44
44
|
s.platform = 'java'
|
45
45
|
end
|
@@ -199,7 +199,7 @@ describe LogStash::Inputs::Beats::MessageListener do
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
-
context "when the message is from
|
202
|
+
context "when the message is from Lumberjack" do
|
203
203
|
let(:message) { MockMessage.new("abc", { "line" => "hello world", '@metadata' => {} } )}
|
204
204
|
|
205
205
|
it "extract the event" do
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-beats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.8.
|
4
|
+
version: 6.8.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -311,7 +311,6 @@ files:
|
|
311
311
|
- spec/inputs/beats/tls_spec.rb
|
312
312
|
- spec/inputs/beats_spec.rb
|
313
313
|
- spec/integration/filebeat_spec.rb
|
314
|
-
- spec/integration/logstash_forwarder_spec.rb
|
315
314
|
- spec/spec_helper.rb
|
316
315
|
- spec/support/client_process_helpers.rb
|
317
316
|
- spec/support/file_helpers.rb
|
@@ -327,7 +326,7 @@ files:
|
|
327
326
|
- vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/4.1.100.Final/netty-transport-native-unix-common-4.1.100.Final.jar
|
328
327
|
- vendor/jar-dependencies/io/netty/netty-transport/4.1.100.Final/netty-transport-4.1.100.Final.jar
|
329
328
|
- vendor/jar-dependencies/org/javassist/javassist/3.24.0-GA/javassist-3.24.0-GA.jar
|
330
|
-
- vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.8.
|
329
|
+
- vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.8.2/logstash-input-beats-6.8.2.jar
|
331
330
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
332
331
|
licenses:
|
333
332
|
- Apache License (2.0)
|
@@ -363,7 +362,6 @@ test_files:
|
|
363
362
|
- spec/inputs/beats/tls_spec.rb
|
364
363
|
- spec/inputs/beats_spec.rb
|
365
364
|
- spec/integration/filebeat_spec.rb
|
366
|
-
- spec/integration/logstash_forwarder_spec.rb
|
367
365
|
- spec/spec_helper.rb
|
368
366
|
- spec/support/client_process_helpers.rb
|
369
367
|
- spec/support/file_helpers.rb
|
@@ -1,108 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require "logstash/inputs/beats"
|
3
|
-
require "logstash/json"
|
4
|
-
require "fileutils"
|
5
|
-
require_relative "../support/flores_extensions"
|
6
|
-
require_relative "../support/file_helpers"
|
7
|
-
require_relative "../support/integration_shared_context"
|
8
|
-
require_relative "../support/client_process_helpers"
|
9
|
-
require "spec_helper"
|
10
|
-
|
11
|
-
LSF_BINARY = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "vendor", "logstash-forwarder", "logstash-forwarder"))
|
12
|
-
|
13
|
-
describe "Logstash-Forwarder", :integration => true do
|
14
|
-
include ClientProcessHelpers
|
15
|
-
|
16
|
-
before :all do
|
17
|
-
unless File.exist?(LSF_BINARY)
|
18
|
-
raise "Cannot find `logstash-forwarder` binary in `vendor/logstash-forwarder` Did you run `bundle exec rake test:integration:setup` before running the integration suite?"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
include FileHelpers
|
23
|
-
include_context "beats configuration"
|
24
|
-
|
25
|
-
let(:client_wait_time) { 5 }
|
26
|
-
|
27
|
-
# Filebeat related variables
|
28
|
-
let(:cmd) { [lsf_exec, "-config", lsf_config_path] }
|
29
|
-
|
30
|
-
let(:lsf_exec) { LSF_BINARY }
|
31
|
-
let(:registry_file) { File.expand_path(File.join(File.dirname(__FILE__), "..", "..", ".logstash-forwarder")) }
|
32
|
-
let_tmp_file(:lsf_config_path) { lsf_config }
|
33
|
-
let(:log_file) { f = Stud::Temporary.file; f.close; f.path }
|
34
|
-
let(:lsf_config) do
|
35
|
-
<<-CONFIG
|
36
|
-
{
|
37
|
-
"network": {
|
38
|
-
"servers": [ "#{host}:#{port}" ],
|
39
|
-
"ssl ca": "#{certificate_authorities}"
|
40
|
-
},
|
41
|
-
"files": [
|
42
|
-
{ "paths": [ "#{log_file}" ] }
|
43
|
-
]
|
44
|
-
}
|
45
|
-
CONFIG
|
46
|
-
end
|
47
|
-
#
|
48
|
-
|
49
|
-
before :each do
|
50
|
-
FileUtils.rm_rf(registry_file) # ensure clean state between runs
|
51
|
-
start_client
|
52
|
-
sleep(1)
|
53
|
-
# let LSF start and than write the logs
|
54
|
-
File.open(log_file, "a") do |f|
|
55
|
-
f.write(events.join("\n") + "\n")
|
56
|
-
end
|
57
|
-
sleep(1) # give some time to the clients to pick up the changes
|
58
|
-
end
|
59
|
-
|
60
|
-
after :each do
|
61
|
-
stop_client
|
62
|
-
end
|
63
|
-
|
64
|
-
xcontext "Plain TCP" do
|
65
|
-
include ClientProcessHelpers
|
66
|
-
|
67
|
-
let(:certificate_authorities) { "" }
|
68
|
-
|
69
|
-
it "should not send any events" do
|
70
|
-
expect(queue.size).to eq(0), @execution_output
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
context "TLS" do
|
75
|
-
context "Server Verification" do
|
76
|
-
let(:input_config) do
|
77
|
-
super().merge({
|
78
|
-
"ssl_enabled" => true,
|
79
|
-
"ssl_certificate" => certificate_file,
|
80
|
-
"ssl_key" => certificate_key_file,
|
81
|
-
})
|
82
|
-
end
|
83
|
-
|
84
|
-
let(:certificate_data) { Flores::PKI.generate }
|
85
|
-
let_tmp_file(:certificate_file) { certificate_data.first }
|
86
|
-
let_tmp_file(:certificate_key_file) { convert_to_pkcs8(certificate_data.last) }
|
87
|
-
let(:certificate_authorities) { certificate_file }
|
88
|
-
|
89
|
-
context "self signed certificate" do
|
90
|
-
include_examples "send events"
|
91
|
-
end
|
92
|
-
|
93
|
-
context "with large batches" do
|
94
|
-
let(:number_of_events) { 10_000 }
|
95
|
-
include_examples "send events"
|
96
|
-
end
|
97
|
-
|
98
|
-
context "invalid CA on the client" do
|
99
|
-
let(:invalid_data) { Flores::PKI.generate }
|
100
|
-
let(:certificate_authorities) { f = Stud::Temporary.file; f.close; f.path }
|
101
|
-
|
102
|
-
it "should not send any events" do
|
103
|
-
expect(queue.size).to eq(0), @execution_output
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|