fluent-plugin-elasticsearch 2.11.1 → 2.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +3 -0
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +7 -5
- data/lib/fluent/plugin/out_elasticsearch_dynamic.rb +2 -2
- data/test/plugin/test_out_elasticsearch.rb +3 -1
- data/test/plugin/test_out_elasticsearch_dynamic.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a4e029357f6bb2c914d2754eb9752a88d774e9eb326cb10f52a6d56d3e3ce09
|
4
|
+
data.tar.gz: b756fbd56d5c830df97f32b97d3f9f9f8593253c59a9861a7d3f8c2ae9d47220
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fa642ed492678b604eb7e8ff5a51e3f03cbe27929d64608432ee538ab98c3f6ca42f5dca63c6434d3290c977f3740445dbb9c3742d7d85faf43603432a491a1
|
7
|
+
data.tar.gz: 843ad9a1fcc3174871e1762a1843839ef9291bb2e862fee331f0b5f8b79f770273295d3c5fef0b0897708b325345110e19afe8a346dd99126c8ba7f0d2cfd98e
|
data/History.md
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'fluent-plugin-elasticsearch'
|
6
|
-
s.version = '2.11.
|
6
|
+
s.version = '2.11.2'
|
7
7
|
s.authors = ['diogo', 'pitr']
|
8
8
|
s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com']
|
9
9
|
s.description = %q{Elasticsearch output plugin for Fluent event collector}
|
@@ -48,7 +48,7 @@ module Fluent::Plugin
|
|
48
48
|
config_param :user, :string, :default => nil
|
49
49
|
config_param :password, :string, :default => nil, :secret => true
|
50
50
|
config_param :path, :string, :default => nil
|
51
|
-
config_param :scheme, :
|
51
|
+
config_param :scheme, :enum, :list => [:https, :http], :default => :http
|
52
52
|
config_param :hosts, :string, :default => nil
|
53
53
|
config_param :target_index_key, :string, :default => nil
|
54
54
|
config_param :target_type_key, :string, :default => nil,
|
@@ -196,8 +196,10 @@ EOC
|
|
196
196
|
if @last_seen_major_version >= 6
|
197
197
|
case @ssl_version
|
198
198
|
when :SSLv23, :TLSv1, :TLSv1_1
|
199
|
-
|
200
|
-
|
199
|
+
if @scheme == :https
|
200
|
+
log.warn "Detected ES 6.x or above and enabled insecure security:
|
201
|
+
You might have to specify `ssl_version TLSv1_2` in configuration."
|
202
|
+
end
|
201
203
|
end
|
202
204
|
end
|
203
205
|
end
|
@@ -306,7 +308,7 @@ EOC
|
|
306
308
|
{
|
307
309
|
host: host_str.split(':')[0],
|
308
310
|
port: (host_str.split(':')[1] || @port).to_i,
|
309
|
-
scheme: @scheme
|
311
|
+
scheme: @scheme.to_s
|
310
312
|
}
|
311
313
|
else
|
312
314
|
# New hosts format expects URLs such as http://logs.foo.com,https://john:pass@logs2.foo.com/elastic
|
@@ -318,7 +320,7 @@ EOC
|
|
318
320
|
end
|
319
321
|
end.compact
|
320
322
|
else
|
321
|
-
[{host: @host, port: @port, scheme: @scheme}]
|
323
|
+
[{host: @host, port: @port, scheme: @scheme.to_s}]
|
322
324
|
end.each do |host|
|
323
325
|
host.merge!(user: @user, password: @password) if !host[:user] && @user
|
324
326
|
host.merge!(path: @path) if !host[:path] && @path
|
@@ -84,7 +84,7 @@ module Fluent::Plugin
|
|
84
84
|
{
|
85
85
|
host: host_str.split(':')[0],
|
86
86
|
port: (host_str.split(':')[1] || @port).to_i,
|
87
|
-
scheme: @scheme
|
87
|
+
scheme: @scheme.to_s
|
88
88
|
}
|
89
89
|
else
|
90
90
|
# New hosts format expects URLs such as http://logs.foo.com,https://john:pass@logs2.foo.com/elastic
|
@@ -96,7 +96,7 @@ module Fluent::Plugin
|
|
96
96
|
end
|
97
97
|
end.compact
|
98
98
|
else
|
99
|
-
[{host: @host, port: @port.to_i, scheme: @scheme}]
|
99
|
+
[{host: @host, port: @port.to_i, scheme: @scheme.to_s}]
|
100
100
|
end.each do |host|
|
101
101
|
host.merge!(user: @user, password: @password) if !host[:user] && @user
|
102
102
|
host.merge!(path: @path) if !host[:path] && @path
|
@@ -196,7 +196,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
196
196
|
|
197
197
|
assert_equal 'logs.google.com', instance.host
|
198
198
|
assert_equal 777, instance.port
|
199
|
-
assert_equal
|
199
|
+
assert_equal :https, instance.scheme
|
200
200
|
assert_equal '/es/', instance.path
|
201
201
|
assert_equal 'john', instance.user
|
202
202
|
assert_equal 'doe', instance.password
|
@@ -247,6 +247,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
247
247
|
config = %{
|
248
248
|
ssl_version TLSv1_1
|
249
249
|
@log_level warn
|
250
|
+
scheme https
|
250
251
|
}
|
251
252
|
instance = driver(config, 6).instance
|
252
253
|
logs = driver.logs
|
@@ -257,6 +258,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
257
258
|
config = %{
|
258
259
|
ssl_version TLSv1_2
|
259
260
|
@log_level warn
|
261
|
+
scheme https
|
260
262
|
}
|
261
263
|
instance = driver(config, 7).instance
|
262
264
|
logs = driver.logs
|
@@ -88,6 +88,7 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
88
88
|
conf = instance.dynamic_config
|
89
89
|
assert_equal 'logs.google.com', conf['host']
|
90
90
|
assert_equal "777", conf['port']
|
91
|
+
assert_equal :https, instance.scheme
|
91
92
|
assert_equal 'john', instance.user
|
92
93
|
assert_equal 'doe', instance.password
|
93
94
|
assert_equal '/es/', instance.path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- diogo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-07-
|
12
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|