logstash-input-beats 6.6.4-java → 6.7.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/logstash/inputs/beats/message_listener.rb +0 -7
- data/lib/logstash-input-beats_jars.rb +7 -7
- data/lib/tasks/test.rake +4 -15
- data/spec/inputs/beats/message_listener_spec.rb +0 -10
- data/spec/integration/filebeat_spec.rb +3 -1
- data/vendor/jar-dependencies/io/netty/netty-buffer/{4.1.94.Final/netty-buffer-4.1.94.Final.jar → 4.1.100.Final/netty-buffer-4.1.100.Final.jar} +0 -0
- data/vendor/jar-dependencies/io/netty/netty-codec/{4.1.94.Final/netty-codec-4.1.94.Final.jar → 4.1.100.Final/netty-codec-4.1.100.Final.jar} +0 -0
- data/vendor/jar-dependencies/io/netty/netty-common/{4.1.94.Final/netty-common-4.1.94.Final.jar → 4.1.100.Final/netty-common-4.1.100.Final.jar} +0 -0
- data/vendor/jar-dependencies/io/netty/netty-handler/{4.1.94.Final/netty-handler-4.1.94.Final.jar → 4.1.100.Final/netty-handler-4.1.100.Final.jar} +0 -0
- data/vendor/jar-dependencies/io/netty/netty-transport/{4.1.94.Final/netty-transport-4.1.94.Final.jar → 4.1.100.Final/netty-transport-4.1.100.Final.jar} +0 -0
- data/vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/{4.1.94.Final/netty-transport-native-unix-common-4.1.94.Final.jar → 4.1.100.Final/netty-transport-native-unix-common-4.1.100.Final.jar} +0 -0
- data/vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/{6.6.4/logstash-input-beats-6.6.4.jar → 6.7.1/logstash-input-beats-6.7.1.jar} +0 -0
- metadata +9 -11
- 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: 633344379c679c34cba9b726bf6743f8dad7da7b65b4266e647d1539c3ef3a08
|
4
|
+
data.tar.gz: 340d1c62e61b64f6787a8e87df877cfd6073aa42ff9601504f21272119fc9937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 779e37e64ba62a4fd988a535866f393bb4797980eee02260b56ddf145194f398f1c2abfb5708d1939279bb4fcf2a6cba0b59b061ea59ea8c57d2a700d64e2e81
|
7
|
+
data.tar.gz: 39f78d631e00518b17af3d88109b3c41f58a3e9ef61d26e7e2a7c97eb0fb0c915b6f7d994b6975d5fd4d0f95cf5e24a54b7d959b373b501dacda8d639c19b04f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 6.7.1
|
2
|
+
- bump netty to 4.1.100 and jackson to 2.15.3 [#484](https://github.com/logstash-plugins/logstash-input-beats/pull/484)
|
3
|
+
|
4
|
+
## 6.7.0
|
5
|
+
- PROTOCOL: adds explicit support for receiving a 0-length window to encapsulate an empty batch. Empty batches are acknowledged with the same 0-sequence ACK's that are used as keep-alives during processing. [#479](https://github.com/logstash-plugins/logstash-input-beats/pull/479)
|
6
|
+
|
1
7
|
## 6.6.4
|
2
8
|
- [DOC] Fix misleading `enrich/source_data` input beats documentation about the Logstash host. [#478](https://github.com/logstash-plugins/logstash-input-beats/pull/478)
|
3
9
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.7.1
|
@@ -9,7 +9,6 @@ module LogStash module Inputs class Beats
|
|
9
9
|
include org.logstash.beats.IMessageListener
|
10
10
|
|
11
11
|
FILEBEAT_LOG_LINE_FIELD = "message".freeze
|
12
|
-
LSF_LOG_LINE_FIELD = "line".freeze
|
13
12
|
|
14
13
|
ConnectionState = Struct.new(:ctx, :codec, :ip_address)
|
15
14
|
|
@@ -183,8 +182,6 @@ module LogStash module Inputs class Beats
|
|
183
182
|
def extract_target_field(hash)
|
184
183
|
if from_filebeat?(hash)
|
185
184
|
hash.delete(FILEBEAT_LOG_LINE_FIELD).to_s
|
186
|
-
elsif from_logstash_forwarder?(hash)
|
187
|
-
hash.delete(LSF_LOG_LINE_FIELD).to_s
|
188
185
|
end
|
189
186
|
end
|
190
187
|
|
@@ -192,10 +189,6 @@ module LogStash module Inputs class Beats
|
|
192
189
|
!hash[FILEBEAT_LOG_LINE_FIELD].nil?
|
193
190
|
end
|
194
191
|
|
195
|
-
def from_logstash_forwarder?(hash)
|
196
|
-
!hash[LSF_LOG_LINE_FIELD].nil?
|
197
|
-
end
|
198
|
-
|
199
192
|
def increment_connection_count
|
200
193
|
current_connection_count = @connections_list.size
|
201
194
|
@metric.gauge(:current_connections, current_connection_count)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
|
2
2
|
|
3
3
|
require 'jar_dependencies'
|
4
|
-
require_jar('io.netty', 'netty-buffer', '4.1.
|
5
|
-
require_jar('io.netty', 'netty-codec', '4.1.
|
6
|
-
require_jar('io.netty', 'netty-common', '4.1.
|
7
|
-
require_jar('io.netty', 'netty-transport', '4.1.
|
8
|
-
require_jar('io.netty', 'netty-handler', '4.1.
|
9
|
-
require_jar('io.netty', 'netty-transport-native-unix-common', '4.1.
|
4
|
+
require_jar('io.netty', 'netty-buffer', '4.1.100.Final')
|
5
|
+
require_jar('io.netty', 'netty-codec', '4.1.100.Final')
|
6
|
+
require_jar('io.netty', 'netty-common', '4.1.100.Final')
|
7
|
+
require_jar('io.netty', 'netty-transport', '4.1.100.Final')
|
8
|
+
require_jar('io.netty', 'netty-handler', '4.1.100.Final')
|
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.
|
11
|
+
require_jar('org.logstash.beats', 'logstash-input-beats', '6.7.1')
|
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
|
|
@@ -21,24 +19,15 @@ end
|
|
21
19
|
require "logstash/devutils/rake"
|
22
20
|
|
23
21
|
namespace :test do
|
22
|
+
task :java do
|
23
|
+
exit(1) unless system './gradlew test'
|
24
|
+
end
|
24
25
|
namespace :integration do
|
25
26
|
task :setup do
|
26
27
|
Rake::Task["test:integration:setup:filebeat"].invoke
|
27
|
-
Rake::Task["test:integration:setup:lsf"].invoke
|
28
28
|
end
|
29
29
|
|
30
30
|
namespace :setup do
|
31
|
-
desc "Download latest stable version of Logstash-forwarder"
|
32
|
-
task :lsf do
|
33
|
-
destination = File.join(VENDOR_PATH, "logstash-forwarder")
|
34
|
-
FileUtils.rm_rf(destination)
|
35
|
-
FileUtils.mkdir_p(destination)
|
36
|
-
download_destination = File.join(destination, "logstash-forwarder")
|
37
|
-
puts "Logstash-forwarder: downloading from #{LSF_URL} to #{download_destination}"
|
38
|
-
download(LSF_URL, download_destination)
|
39
|
-
File.chmod(0755, download_destination)
|
40
|
-
end
|
41
|
-
|
42
31
|
desc "Download nigthly filebeat for integration testing"
|
43
32
|
task :filebeat do
|
44
33
|
FileUtils.mkdir_p(VENDOR_PATH)
|
@@ -57,7 +46,7 @@ namespace :test do
|
|
57
46
|
end
|
58
47
|
|
59
48
|
# Uncompress all the file from the archive this only work with
|
60
|
-
# one level directory structure and
|
49
|
+
# one level directory structure and filebeat packaging.
|
61
50
|
def untar_all(file, destination)
|
62
51
|
untar(file) do |entry|
|
63
52
|
out = entry.full_name.split("/").last
|
@@ -199,16 +199,6 @@ describe LogStash::Inputs::Beats::MessageListener do
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
-
context "when the message is from LSF" do
|
203
|
-
let(:message) { MockMessage.new("abc", { "line" => "hello world", '@metadata' => {} } )}
|
204
|
-
|
205
|
-
it "extract the event" do
|
206
|
-
subject.onNewMessage(ctx, message)
|
207
|
-
event = queue.pop
|
208
|
-
expect(event.get("message")).to eq("hello world")
|
209
|
-
end
|
210
|
-
end
|
211
|
-
|
212
202
|
it_behaves_like "when the message is from any libbeat", :disabled, "[@metadata][ip_address]"
|
213
203
|
it_behaves_like "when the message is from any libbeat", :v1, "[@metadata][input][beats][host][ip]"
|
214
204
|
it_behaves_like "when the message is from any libbeat", :v8, "[@metadata][input][beats][host][ip]"
|
@@ -222,7 +222,9 @@ describe "Filebeat", :integration => true do
|
|
222
222
|
|
223
223
|
# NOTE: CentOS 7 base image (LS < 7.17) uses OpenSSL 1.0 while later is using Ubuntu 20.04 with OpenSSL 1.1.1
|
224
224
|
# the default algorithm for `openssl pkcs8 -topk8` changed to -v2 which Java does not support (see GH-443)
|
225
|
-
|
225
|
+
# Starting from OpenSSL 3, RC cipher algorithms has been moved into provider-legacy package which is not always installed in all OSes.
|
226
|
+
# Use cipher that is available in openssl main package.
|
227
|
+
cmd = "openssl pkcs8 -topk8 -in #{cert_key} -out #{@cert_key_pkcs8} -v1 PBE-SHA1-3DES -passin pass:#{@passphrase} -passout pass:#{@passphrase}"
|
226
228
|
unless system(cmd)
|
227
229
|
fail "failed to run openssl command: #{$?} \n#{cmd}"
|
228
230
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.
|
4
|
+
version: 6.7.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-18 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
|
@@ -320,14 +319,14 @@ files:
|
|
320
319
|
- spec/support/integration_shared_context.rb
|
321
320
|
- spec/support/logstash_test.rb
|
322
321
|
- spec/support/shared_examples.rb
|
323
|
-
- vendor/jar-dependencies/io/netty/netty-buffer/4.1.
|
324
|
-
- vendor/jar-dependencies/io/netty/netty-codec/4.1.
|
325
|
-
- vendor/jar-dependencies/io/netty/netty-common/4.1.
|
326
|
-
- vendor/jar-dependencies/io/netty/netty-handler/4.1.
|
327
|
-
- vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/4.1.
|
328
|
-
- vendor/jar-dependencies/io/netty/netty-transport/4.1.
|
322
|
+
- vendor/jar-dependencies/io/netty/netty-buffer/4.1.100.Final/netty-buffer-4.1.100.Final.jar
|
323
|
+
- vendor/jar-dependencies/io/netty/netty-codec/4.1.100.Final/netty-codec-4.1.100.Final.jar
|
324
|
+
- vendor/jar-dependencies/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar
|
325
|
+
- vendor/jar-dependencies/io/netty/netty-handler/4.1.100.Final/netty-handler-4.1.100.Final.jar
|
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
|
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.
|
329
|
+
- vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.7.1/logstash-input-beats-6.7.1.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
|