fluent-plugin-elasticsearch 5.1.3 → 5.1.4
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cbe785cfd5534abf0b55d8207eae176d1dd02d5ef7a3092e9f0ef3c6d588e7f
|
4
|
+
data.tar.gz: c12b413d1415ac38a6d119ff1f0ca106b1d4f1017f206ce72d97a74abe819551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d30472143db2451da2eca168b22086d157abb7e62c26f1df5afa2ab4ed23a250a2b81fd04424f260dbfe996cc0a4794504e0c4262efc7969db363be02c79bcf9
|
7
|
+
data.tar.gz: 9fd7a57fe732f18b6f568a96052ba7a5bf51423e93072ba230c7a57866b828dfe07e16b11f937c5d84d0cb01619fe027ccd80c0a0a4fb939d94a41f127ff5e3c
|
data/History.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
### [Unreleased]
|
4
4
|
|
5
|
+
### 5.1.4
|
6
|
+
- Handle ES8 or above more strictly (#931)
|
7
|
+
- fixing double "\_policy" in index lifecycle management policy for elasticsearch\_data\_stream output (#930)
|
8
|
+
|
5
9
|
### 5.1.3
|
6
10
|
- fixing execution order for dynamic data stream creation (#928)
|
7
11
|
|
@@ -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 = '5.1.
|
6
|
+
s.version = '5.1.4'
|
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}
|
@@ -987,12 +987,12 @@ EOC
|
|
987
987
|
elsif @last_seen_major_version == 7
|
988
988
|
log.warn "Detected ES 7.x: `_doc` will be used as the document `_type`."
|
989
989
|
target_type = '_doc'.freeze
|
990
|
-
elsif @last_seen_major_version >=8
|
990
|
+
elsif @last_seen_major_version >= 8
|
991
991
|
log.debug "Detected ES 8.x or above: document type will not be used."
|
992
992
|
target_type = nil
|
993
993
|
end
|
994
994
|
else
|
995
|
-
if @suppress_type_name && @last_seen_major_version
|
995
|
+
if @suppress_type_name && @last_seen_major_version == 7
|
996
996
|
target_type = nil
|
997
997
|
elsif @last_seen_major_version == 7 && @type_name != DEFAULT_TYPE_NAME_ES_7x
|
998
998
|
log.warn "Detected ES 7.x: `_doc` will be used as the document `_type`."
|
@@ -79,7 +79,7 @@ module Fluent::Plugin
|
|
79
79
|
def create_ilm_policy(datastream_name, template_name, ilm_name, host)
|
80
80
|
return if data_stream_exist?(datastream_name) or template_exists?(template_name, host) or ilm_policy_exists?(ilm_name)
|
81
81
|
params = {
|
82
|
-
policy_id:
|
82
|
+
policy_id: ilm_name,
|
83
83
|
body: File.read(File.join(File.dirname(__FILE__), "default-ilm-policy.json"))
|
84
84
|
}
|
85
85
|
retry_operate(@max_retry_putting_template,
|
@@ -62,8 +62,8 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
62
62
|
DUPLICATED_DATA_STREAM_EXCEPTION = {"error": {}, "status": 400}
|
63
63
|
NONEXISTENT_DATA_STREAM_EXCEPTION = {"error": {}, "status": 404}
|
64
64
|
|
65
|
-
def stub_ilm_policy(name="
|
66
|
-
stub_request(:put, "http://localhost:9200/_ilm/policy/#{name}
|
65
|
+
def stub_ilm_policy(name="foo_ilm_policy")
|
66
|
+
stub_request(:put, "http://localhost:9200/_ilm/policy/#{name}").to_return(:status => [200, RESPONSE_ACKNOWLEDGED])
|
67
67
|
end
|
68
68
|
|
69
69
|
def stub_index_template(name="foo_tpl")
|
@@ -78,7 +78,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
78
78
|
stub_request(:get, "http://localhost:9200/_data_stream/#{name}").to_return(:status => [200, RESPONSE_ACKNOWLEDGED])
|
79
79
|
end
|
80
80
|
|
81
|
-
def stub_existent_ilm?(name="
|
81
|
+
def stub_existent_ilm?(name="foo_ilm_policy")
|
82
82
|
stub_request(:get, "http://localhost:9200/_ilm/policy/#{name}").to_return(:status => [200, RESPONSE_ACKNOWLEDGED])
|
83
83
|
end
|
84
84
|
|
@@ -90,7 +90,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
90
90
|
stub_request(:get, "http://localhost:9200/_data_stream/#{name}").to_return(:status => [404, Elasticsearch::Transport::Transport::Errors::NotFound])
|
91
91
|
end
|
92
92
|
|
93
|
-
def stub_nonexistent_ilm?(name="
|
93
|
+
def stub_nonexistent_ilm?(name="foo_ilm_policy")
|
94
94
|
stub_request(:get, "http://localhost:9200/_ilm/policy/#{name}").to_return(:status => [404, Elasticsearch::Transport::Transport::Errors::NotFound])
|
95
95
|
end
|
96
96
|
|
@@ -98,7 +98,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
98
98
|
stub_request(:get, "http://localhost:9200/_index_template/#{name}").to_return(:status => [404, Elasticsearch::Transport::Transport::Errors::NotFound])
|
99
99
|
end
|
100
100
|
|
101
|
-
def stub_bulk_feed(datastream_name="foo", ilm_name="
|
101
|
+
def stub_bulk_feed(datastream_name="foo", ilm_name="foo_ilm_policy", template_name="foo_tpl")
|
102
102
|
stub_request(:post, "http://localhost:9200/#{datastream_name}/_bulk").with do |req|
|
103
103
|
# bulk data must be pair of OP and records
|
104
104
|
# {"create": {}}\nhttp://localhost:9200/_ilm/policy/foo_ilm_bar
|
@@ -124,7 +124,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
124
124
|
stub_request(:get, url).to_return({:status => 200, :body => body, :headers => { 'Content-Type' => 'json' } })
|
125
125
|
end
|
126
126
|
|
127
|
-
def stub_default(datastream_name="foo", ilm_name="
|
127
|
+
def stub_default(datastream_name="foo", ilm_name="foo_ilm_policy", template_name="foo_tpl", host="http://localhost:9200")
|
128
128
|
stub_elastic_info(host)
|
129
129
|
stub_nonexistent_ilm?(ilm_name)
|
130
130
|
stub_ilm_policy(ilm_name)
|
@@ -431,7 +431,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
431
431
|
'ROOT', '', {
|
432
432
|
'@type' => ELASTIC_DATA_STREAM_TYPE,
|
433
433
|
'data_stream_name' => 'foo',
|
434
|
-
'data_stream_ilm_name' => "
|
434
|
+
'data_stream_ilm_name' => "foo_ilm_policy",
|
435
435
|
'data_stream_template_name' => "foo_tpl"
|
436
436
|
})
|
437
437
|
assert_equal "foo", driver(conf).instance.data_stream_name
|
@@ -449,7 +449,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
449
449
|
'ROOT', '', {
|
450
450
|
'@type' => ELASTIC_DATA_STREAM_TYPE,
|
451
451
|
'data_stream_name' => 'foo',
|
452
|
-
'data_stream_ilm_name' => "
|
452
|
+
'data_stream_ilm_name' => "foo_ilm_policy",
|
453
453
|
'data_stream_template_name' => "foo_tpl"
|
454
454
|
})
|
455
455
|
assert_equal "foo", driver(conf).instance.data_stream_name
|
@@ -467,10 +467,10 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
467
467
|
'ROOT', '', {
|
468
468
|
'@type' => ELASTIC_DATA_STREAM_TYPE,
|
469
469
|
'data_stream_name' => 'foo',
|
470
|
-
'data_stream_ilm_name' => "
|
470
|
+
'data_stream_ilm_name' => "foo_ilm_policy",
|
471
471
|
})
|
472
472
|
assert_equal "foo", driver(conf).instance.data_stream_name
|
473
|
-
assert_equal "
|
473
|
+
assert_equal "foo_ilm_policy", driver(conf).instance.data_stream_ilm_name
|
474
474
|
assert_equal "foo_template", driver(conf).instance.data_stream_template_name
|
475
475
|
end
|
476
476
|
|
@@ -615,7 +615,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
615
615
|
'ROOT', '', {
|
616
616
|
'@type' => ELASTIC_DATA_STREAM_TYPE,
|
617
617
|
'data_stream_name' => 'foo',
|
618
|
-
'data_stream_ilm_name' => '
|
618
|
+
'data_stream_ilm_name' => 'foo_ilm_policy',
|
619
619
|
'data_stream_template_name' => 'foo_tpl'
|
620
620
|
})
|
621
621
|
driver(conf).run(default_tag: 'test') do
|
@@ -635,7 +635,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
635
635
|
port 778
|
636
636
|
scheme https
|
637
637
|
data_stream_name foo
|
638
|
-
data_stream_ilm_name
|
638
|
+
data_stream_ilm_name foo_ilm_policy
|
639
639
|
data_stream_template_name foo_tpl
|
640
640
|
user john
|
641
641
|
password doe
|
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: 5.1.
|
4
|
+
version: 5.1.4
|
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: 2021-11-
|
13
|
+
date: 2021-11-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|