fluent-plugin-elasticsearch 4.0.6 → 4.0.7
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/README.md +16 -0
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +9 -1
- data/test/plugin/test_out_elasticsearch.rb +15 -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: d6a25db7c9a8c6d5d31365939cb60092440a299f4bacb52f1c3896927aa501a7
|
4
|
+
data.tar.gz: ed08dc5d2d526a9211a76dd36c0db7a90f1e50a17d6cc634790d3e6cba286175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c00a1d839a4adc7d47b3032099a81f6e73fe126ef0711d61518fe9034b915a39d9b6f50d19cc7a5dd39f8e903e243b745fc615a097794d4d456ba2a2a71a54c5
|
7
|
+
data.tar.gz: 84501757defe9cd9e78f95843cc39f3cfa68a32c09ef0235764c2e2bc2bc9e37a59241bd40ba74a87de8bbf968ea172db5e6aed55b233833029683213b0040ec
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -66,6 +66,7 @@ Current maintainers: @cosmo0920
|
|
66
66
|
+ [content_type](#content_type)
|
67
67
|
+ [include_index_in_url](#include_index_in_url)
|
68
68
|
+ [http_backend](#http_backend)
|
69
|
+
+ [http_backend_excon_nonblock](#http_backend_excon_nonblock)
|
69
70
|
+ [prefer_oj_serializer](#prefer_oj_serializer)
|
70
71
|
+ [compression_level](#compression_level)
|
71
72
|
+ [Client/host certificate options](#clienthost-certificate-options)
|
@@ -816,6 +817,21 @@ Default value is `excon` which is default http_backend of elasticsearch plugin.
|
|
816
817
|
http_backend typhoeus
|
817
818
|
```
|
818
819
|
|
820
|
+
### http_backend_excon_nonblock
|
821
|
+
|
822
|
+
With `http_backend_excon_nonblock false`, elasticsearch plugin use excon with nonblock=false.
|
823
|
+
If you use elasticsearch plugin with jRuby for https, you may need to consider to set `false` to avoid follwoing problems.
|
824
|
+
- https://github.com/geemus/excon/issues/106
|
825
|
+
- https://github.com/jruby/jruby-ossl/issues/19
|
826
|
+
|
827
|
+
But for all other case, it strongly reccomend to set `true` to avoid process hangin problem reported in https://github.com/uken/fluent-plugin-elasticsearch/issues/732
|
828
|
+
|
829
|
+
Default value is `true`.
|
830
|
+
|
831
|
+
```
|
832
|
+
http_backend_excon_nonblock false
|
833
|
+
```
|
834
|
+
|
819
835
|
### compression_level
|
820
836
|
You can add gzip compression of output data. In this case `default_compression`, `best_compression` or `best speed` option should be chosen.
|
821
837
|
By default there is no compression, default value for this option is `no_compression`
|
@@ -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 = '4.0.
|
6
|
+
s.version = '4.0.7'
|
7
7
|
s.authors = ['diogo', 'pitr', 'Hiroshi Hatake']
|
8
8
|
s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com', 'cosmo0920.wp@gmail.com']
|
9
9
|
s.description = %q{Elasticsearch output plugin for Fluent event collector}
|
@@ -143,6 +143,7 @@ see: https://github.com/elastic/elasticsearch-ruby/pull/514
|
|
143
143
|
EOC
|
144
144
|
config_param :include_index_in_url, :bool, :default => false
|
145
145
|
config_param :http_backend, :enum, list: [:excon, :typhoeus], :default => :excon
|
146
|
+
config_param :http_backend_excon_nonblock, :bool, :default => true
|
146
147
|
config_param :validate_client_version, :bool, :default => false
|
147
148
|
config_param :prefer_oj_serializer, :bool, :default => false
|
148
149
|
config_param :unrecoverable_error_types, :array, :default => ["out_of_memory_error", "es_rejected_execution_exception"]
|
@@ -327,6 +328,13 @@ EOC
|
|
327
328
|
end
|
328
329
|
end
|
329
330
|
|
331
|
+
if @ssl_version && @scheme == :https
|
332
|
+
if !@http_backend_excon_nonblock
|
333
|
+
log.warn "TLS handshake will be stucked with block connection.
|
334
|
+
Consider to set `http_backend_excon_nonblock` as true"
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
330
338
|
# Consider missing the prefix of "$." in nested key specifiers.
|
331
339
|
@id_key = convert_compat_id_key(@id_key) if @id_key
|
332
340
|
@parent_key = convert_compat_id_key(@parent_key) if @parent_key
|
@@ -409,7 +417,7 @@ EOC
|
|
409
417
|
def backend_options
|
410
418
|
case @http_backend
|
411
419
|
when :excon
|
412
|
-
{ client_key: @client_key, client_cert: @client_cert, client_key_pass: @client_key_pass }
|
420
|
+
{ client_key: @client_key, client_cert: @client_cert, client_key_pass: @client_key_pass, nonblock: @http_backend_excon_nonblock }
|
413
421
|
when :typhoeus
|
414
422
|
require 'typhoeus'
|
415
423
|
{ sslkey: @client_key, sslcert: @client_cert, keypasswd: @client_key_pass }
|
@@ -251,6 +251,7 @@ class ElasticsearchOutputTest < Test::Unit::TestCase
|
|
251
251
|
assert_equal 20 * 1024 * 1024, Fluent::Plugin::ElasticsearchOutput::TARGET_BULK_BYTES
|
252
252
|
assert_false instance.compression
|
253
253
|
assert_equal :no_compression, instance.compression_level
|
254
|
+
assert_true instance.http_backend_excon_nonblock
|
254
255
|
end
|
255
256
|
|
256
257
|
test 'configure compression' do
|
@@ -332,6 +333,20 @@ class ElasticsearchOutputTest < Test::Unit::TestCase
|
|
332
333
|
}
|
333
334
|
end
|
334
335
|
|
336
|
+
sub_test_case 'Check TLS handshake stuck warning log' do
|
337
|
+
test 'warning TLS log' do
|
338
|
+
config = %{
|
339
|
+
scheme https
|
340
|
+
http_backend_excon_nonblock false
|
341
|
+
ssl_version TLSv1_2
|
342
|
+
@log_level info
|
343
|
+
}
|
344
|
+
driver(config)
|
345
|
+
logs = driver.logs
|
346
|
+
assert_logs_include(logs, /TLS handshake will be stucked with block connection.\n Consider to set `http_backend_excon_nonblock` as true\n/)
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
335
350
|
sub_test_case 'ILM default config' do
|
336
351
|
setup do
|
337
352
|
begin
|
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: 4.0.
|
4
|
+
version: 4.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- diogo
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-03-
|
13
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|