fluent-plugin-beats 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbf1984c54ddbc5ba2441f91e5ff771b6a6d0a73
4
- data.tar.gz: 6f19cce2725f173f5df2df64f83bfdc7d1385ec2
3
+ metadata.gz: 7afa3e6515497fdece40f76d74950bff9c55ca20
4
+ data.tar.gz: 4bc784e37dc7de31d5713100c65188cee033cc7b
5
5
  SHA512:
6
- metadata.gz: f332addefaad67cca65ad060aa79399962133cd0dbb770951ef6693221bd2db4276e4478777f3ec1043047762306b2b70c0bc8a15879bd3201e305cad2fdc1ee
7
- data.tar.gz: f05e0c59953dc0ccdef6365bebba98ff4c5356046a226692b60e8e25fe70c7d64117a8d8858118de89e21ab9de85ff341c3616866a4c777936e47b3799838d7a
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.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.1
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-01-18 00:00:00.000000000 Z
11
+ date: 2019-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd