fluent-plugin-elasticsearch 5.0.1 → 5.0.2
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/.github/workflows/linux.yml +1 -1
- data/.github/workflows/macos.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/History.md +5 -0
- data/fluent-plugin-elasticsearch.gemspec +2 -1
- data/lib/fluent/plugin/out_elasticsearch_data_stream.rb +2 -0
- data/test/plugin/test_out_elasticsearch_data_stream.rb +4 -4
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa89d08181943944c6bda419dcf34ef9f1bbe94b67bb270c293d8a0fa03dced0
|
4
|
+
data.tar.gz: d276c5a35783d83608032740c69e2d33e9b6462f507b83e4ff393feb4ed1d151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28c78fb744db4ae40a31f27a4d25fed52d278cfc8cf39c5d5bcbcf129302c1a2157e609179ecfa6693465454c131834bb04d6f40b42a46c6cdf45e71f3036291
|
7
|
+
data.tar.gz: f19746088603311f3aa06787fcc219e810ef97762ae72563b557a00ad29518a06f4c641a951913be3865b86cae7cda2329856c4d2317a0a8a2360109aa8ffca5
|
data/.github/workflows/linux.yml
CHANGED
data/.github/workflows/macos.yml
CHANGED
data/History.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
### [Unreleased]
|
4
4
|
|
5
|
+
### 5.0.2
|
6
|
+
- GitHub Actions: Tweak Ruby versions on test (#875)
|
7
|
+
- test: datastreams: Set nonexistent datastream as default (#874)
|
8
|
+
- Fix overwriting of index template and index lifecycle policy on existing data streams (#872)
|
9
|
+
|
5
10
|
### 5.0.1
|
6
11
|
- Use elasticsearch/api instead of elasticsearch/xpack (#870)
|
7
12
|
|
@@ -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.0.
|
6
|
+
s.version = '5.0.2'
|
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}
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
|
29
29
|
|
30
30
|
s.add_development_dependency 'rake', '>= 0'
|
31
|
+
s.add_development_dependency 'webrick', '~> 1.7.0'
|
31
32
|
s.add_development_dependency 'webmock', '~> 3'
|
32
33
|
s.add_development_dependency 'test-unit', '~> 3.3.0'
|
33
34
|
s.add_development_dependency 'minitest', '~> 5.8'
|
@@ -67,6 +67,7 @@ module Fluent::Plugin
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def create_ilm_policy(name)
|
70
|
+
return if data_stream_exist?(name)
|
70
71
|
params = {
|
71
72
|
policy_id: "#{name}_policy",
|
72
73
|
body: File.read(File.join(File.dirname(__FILE__), "default-ilm-policy.json"))
|
@@ -79,6 +80,7 @@ module Fluent::Plugin
|
|
79
80
|
end
|
80
81
|
|
81
82
|
def create_index_template(name)
|
83
|
+
return if data_stream_exist?(name)
|
82
84
|
body = {
|
83
85
|
"index_patterns" => ["#{name}*"],
|
84
86
|
"data_stream" => {},
|
@@ -79,7 +79,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def stub_nonexistent_data_stream?(name="foo")
|
82
|
-
stub_request(:get, "http://localhost:9200/_data_stream/#{name}").to_return(:status => [
|
82
|
+
stub_request(:get, "http://localhost:9200/_data_stream/#{name}").to_return(:status => [404, Elasticsearch::Transport::Transport::Errors::NotFound])
|
83
83
|
end
|
84
84
|
|
85
85
|
def stub_bulk_feed(name="foo")
|
@@ -94,7 +94,7 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
94
94
|
def stub_default(name="foo")
|
95
95
|
stub_ilm_policy(name)
|
96
96
|
stub_index_template(name)
|
97
|
-
|
97
|
+
stub_nonexistent_data_stream?(name)
|
98
98
|
stub_data_stream(name)
|
99
99
|
end
|
100
100
|
|
@@ -207,12 +207,12 @@ class ElasticsearchOutputDataStreamTest < Test::Unit::TestCase
|
|
207
207
|
assert_equal "foo", driver(conf).instance.data_stream_name
|
208
208
|
end
|
209
209
|
|
210
|
-
def
|
210
|
+
def test_existent_data_stream
|
211
211
|
omit REQUIRED_ELASTIC_MESSAGE unless data_stream_supported?
|
212
212
|
|
213
213
|
stub_ilm_policy
|
214
214
|
stub_index_template
|
215
|
-
|
215
|
+
stub_existent_data_stream?
|
216
216
|
stub_data_stream
|
217
217
|
conf = config_element(
|
218
218
|
'ROOT', '', {
|
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.0.
|
4
|
+
version: 5.0.2
|
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-03-
|
13
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|
@@ -68,6 +68,20 @@ dependencies:
|
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: webrick
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.7.0
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - "~>"
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 1.7.0
|
71
85
|
- !ruby/object:Gem::Dependency
|
72
86
|
name: webmock
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
223
|
- !ruby/object:Gem::Version
|
210
224
|
version: '0'
|
211
225
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
226
|
+
rubygems_version: 3.2.3
|
213
227
|
signing_key:
|
214
228
|
specification_version: 4
|
215
229
|
summary: Elasticsearch output plugin for Fluent event collector
|