fluent-plugin-beats 1.0.1 → 1.1.0
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/README.md +1 -1
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_beats.rb +3 -1
- data/lib/lumberjack/beats/server.rb +9 -1
- data/test/plugin/test_in_beats.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7afa3e6515497fdece40f76d74950bff9c55ca20
|
|
4
|
+
data.tar.gz: 4bc784e37dc7de31d5713100c65188cee033cc7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26ebbf0966bcb09a36926137ddd6f0d88eee62da864eb4c36b9a1255877ac5f0037199b1d9ea611f5ca1aa297a82e8107bbf5fb1e6f7fff5dcb03b934863ad74
|
|
7
|
+
data.tar.gz: 913be723f4ed8deb4ed19308b6aa8fd680237a21f703dca6ccf9cda63fe084de4ec0dd6c7f95614edd48fd61b3e0da734a59ce3667ad224d2762021a9436109b
|
data/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Configuration example:
|
|
|
58
58
|
|
|
59
59
|
Limit the number of connections from beat instances. Default is unlimited.
|
|
60
60
|
|
|
61
|
-
**use_ssl**, **ssl_certificate**, **ssl_key**, **ssl_key_passphrase**
|
|
61
|
+
**use_ssl**, **ssl_certificate**, **ssl_key**, **ssl_key_passphrase**, **ssl_version**, **ssl_ciphers**
|
|
62
62
|
|
|
63
63
|
For lumberjack protocol.
|
|
64
64
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0
|
|
1
|
+
1.1.0
|
|
@@ -42,6 +42,8 @@ module Fluent::Plugin
|
|
|
42
42
|
config_param :ssl_certificate, :string, :default => nil
|
|
43
43
|
config_param :ssl_key, :string, :default => nil
|
|
44
44
|
config_param :ssl_key_passphrase, :string, :default => nil
|
|
45
|
+
config_param :ssl_version, :string, :default => nil
|
|
46
|
+
config_param :ssl_ciphers, :string, :default => nil
|
|
45
47
|
|
|
46
48
|
config_section :parse do
|
|
47
49
|
config_set_default :@type, DEFAULT_PARSER
|
|
@@ -75,7 +77,7 @@ module Fluent::Plugin
|
|
|
75
77
|
|
|
76
78
|
@lumberjack = Lumberjack::Beats::Server.new(
|
|
77
79
|
:address => @bind, :port => @port, :ssl => @use_ssl, :ssl_certificate => @ssl_certificate,
|
|
78
|
-
:ssl_key => @ssl_key, :ssl_key_passphrase => @ssl_key_passphrase)
|
|
80
|
+
:ssl_key => @ssl_key, :ssl_key_passphrase => @ssl_key_passphrase, :ssl_version => @ssl_version, :ssl_ciphers => @ssl_ciphers)
|
|
79
81
|
# Lumberjack::Beats::Server depends on normal accept so we need to launch thread for each connection.
|
|
80
82
|
# TODO: Re-implement Beats Server with Cool.io for resource control
|
|
81
83
|
@thread_pool = Concurrent::CachedThreadPool.new(:idletime => 15) # idletime setting is based on logstash beats input
|
|
@@ -29,7 +29,9 @@ module Lumberjack module Beats
|
|
|
29
29
|
:ssl => true,
|
|
30
30
|
:ssl_certificate => nil,
|
|
31
31
|
:ssl_key => nil,
|
|
32
|
-
:ssl_key_passphrase => nil
|
|
32
|
+
:ssl_key_passphrase => nil,
|
|
33
|
+
:ssl_version => nil,
|
|
34
|
+
:ssl_ciphers => nil,
|
|
33
35
|
}.merge(options)
|
|
34
36
|
|
|
35
37
|
if @options[:ssl]
|
|
@@ -51,6 +53,12 @@ module Lumberjack module Beats
|
|
|
51
53
|
if @options[:ssl]
|
|
52
54
|
# load SSL certificate
|
|
53
55
|
@ssl = OpenSSL::SSL::SSLContext.new
|
|
56
|
+
if @options[:ssl_version]
|
|
57
|
+
@ssl.ssl_version = @options[:ssl_version]
|
|
58
|
+
end
|
|
59
|
+
if @options[:ssl_ciphers]
|
|
60
|
+
@ssl.ciphers = @options[:ssl_ciphers]
|
|
61
|
+
end
|
|
54
62
|
@ssl.cert = OpenSSL::X509::Certificate.new(File.read(@options[:ssl_certificate]))
|
|
55
63
|
@ssl.key = OpenSSL::PKey::RSA.new(File.read(@options[:ssl_key]),
|
|
56
64
|
@options[:ssl_key_passphrase])
|
|
@@ -36,6 +36,18 @@ class BeatsInputTest < Test::Unit::TestCase
|
|
|
36
36
|
assert_equal PORT, d.instance.port
|
|
37
37
|
assert_equal '127.0.0.1', d.instance.bind
|
|
38
38
|
assert_equal 'test.beats', d.instance.tag
|
|
39
|
+
assert_false d.instance.use_ssl
|
|
40
|
+
assert_nil d.instance.ssl_certificate
|
|
41
|
+
assert_nil d.instance.ssl_key
|
|
42
|
+
assert_nil d.instance.ssl_key_passphrase
|
|
43
|
+
assert_nil d.instance.ssl_version
|
|
44
|
+
assert_nil d.instance.ssl_ciphers
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def test_configure_without_tag_parameters
|
|
48
|
+
assert_raise Fluent::ConfigError.new("'tag' or 'metadata_as_tag' parameter is required on beats input") do
|
|
49
|
+
create_driver('')
|
|
50
|
+
end
|
|
39
51
|
end
|
|
40
52
|
|
|
41
53
|
def test_send_beat
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-beats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masahiro Nakagawa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|