fluent-plugin-elasticsearch 4.0.7 → 4.1.0
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/issue-auto-closer.yml +12 -0
- data/.github/workflows/linux.yml +26 -0
- data/.github/workflows/macos.yml +26 -0
- data/.github/workflows/windows.yml +26 -0
- data/History.md +25 -0
- data/README.ElasticsearchGenID.md +116 -0
- data/README.md +78 -3
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/elasticsearch_fallback_selector.rb +9 -0
- data/lib/fluent/plugin/elasticsearch_tls.rb +3 -3
- data/lib/fluent/plugin/filter_elasticsearch_genid.rb +52 -0
- data/lib/fluent/plugin/out_elasticsearch.rb +68 -31
- data/lib/fluent/plugin/out_elasticsearch_dynamic.rb +6 -4
- data/test/plugin/test_elasticsearch_fallback_selector.rb +73 -0
- data/test/plugin/test_elasticsearch_tls.rb +2 -2
- data/test/plugin/test_filter_elasticsearch_genid.rb +171 -0
- data/test/plugin/test_out_elasticsearch.rb +408 -5
- data/test/plugin/test_out_elasticsearch_dynamic.rb +21 -3
- metadata +10 -2
@@ -101,7 +101,7 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
101
101
|
assert_nil instance.ssl_max_version
|
102
102
|
assert_nil instance.ssl_min_version
|
103
103
|
if Fluent::Plugin::ElasticsearchTLS::USE_TLS_MINMAX_VERSION
|
104
|
-
assert_equal({max_version: OpenSSL::SSL::
|
104
|
+
assert_equal({max_version: OpenSSL::SSL::TLS1_3_VERSION, min_version: OpenSSL::SSL::TLS1_2_VERSION},
|
105
105
|
instance.ssl_version_options)
|
106
106
|
else
|
107
107
|
assert_equal({version: Fluent::Plugin::ElasticsearchTLS::DEFAULT_VERSION},
|
@@ -147,7 +147,16 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
147
147
|
}
|
148
148
|
instance = driver(config).instance
|
149
149
|
|
150
|
-
assert_equal
|
150
|
+
assert_equal nil, instance.client.transport.options[:transport_options][:headers]["Content-Encoding"]
|
151
|
+
|
152
|
+
stub_request(:post, "http://localhost:9200/_bulk").
|
153
|
+
to_return(status: 200, body: "", headers: {})
|
154
|
+
driver.run(default_tag: 'test') do
|
155
|
+
driver.feed(sample_record)
|
156
|
+
end
|
157
|
+
compressable = instance.compressable_connection
|
158
|
+
|
159
|
+
assert_equal "gzip", instance.client(nil, compressable).transport.options[:transport_options][:headers]["Content-Encoding"]
|
151
160
|
end
|
152
161
|
|
153
162
|
test 'check compression option is passed to transport' do
|
@@ -158,7 +167,16 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
158
167
|
}
|
159
168
|
instance = driver(config).instance
|
160
169
|
|
161
|
-
assert_equal
|
170
|
+
assert_equal false, instance.client.transport.options[:compression]
|
171
|
+
|
172
|
+
stub_request(:post, "http://localhost:9200/_bulk").
|
173
|
+
to_return(status: 200, body: "", headers: {})
|
174
|
+
driver.run(default_tag: 'test') do
|
175
|
+
driver.feed(sample_record)
|
176
|
+
end
|
177
|
+
compressable = instance.compressable_connection
|
178
|
+
|
179
|
+
assert_equal true, instance.client(nil, compressable).transport.options[:compression]
|
162
180
|
end
|
163
181
|
|
164
182
|
test 'configure Content-Type' do
|
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.1.0
|
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-
|
13
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|
@@ -135,6 +135,10 @@ extra_rdoc_files: []
|
|
135
135
|
files:
|
136
136
|
- ".coveralls.yml"
|
137
137
|
- ".editorconfig"
|
138
|
+
- ".github/workflows/issue-auto-closer.yml"
|
139
|
+
- ".github/workflows/linux.yml"
|
140
|
+
- ".github/workflows/macos.yml"
|
141
|
+
- ".github/workflows/windows.yml"
|
138
142
|
- ".gitignore"
|
139
143
|
- ".travis.yml"
|
140
144
|
- CONTRIBUTING.md
|
@@ -143,6 +147,7 @@ files:
|
|
143
147
|
- ISSUE_TEMPLATE.md
|
144
148
|
- LICENSE.txt
|
145
149
|
- PULL_REQUEST_TEMPLATE.md
|
150
|
+
- README.ElasticsearchGenID.md
|
146
151
|
- README.ElasticsearchInput.md
|
147
152
|
- README.md
|
148
153
|
- Rakefile
|
@@ -155,6 +160,7 @@ files:
|
|
155
160
|
- lib/fluent/plugin/elasticsearch_constants.rb
|
156
161
|
- lib/fluent/plugin/elasticsearch_error.rb
|
157
162
|
- lib/fluent/plugin/elasticsearch_error_handler.rb
|
163
|
+
- lib/fluent/plugin/elasticsearch_fallback_selector.rb
|
158
164
|
- lib/fluent/plugin/elasticsearch_index_lifecycle_management.rb
|
159
165
|
- lib/fluent/plugin/elasticsearch_index_template.rb
|
160
166
|
- lib/fluent/plugin/elasticsearch_simple_sniffer.rb
|
@@ -167,6 +173,7 @@ files:
|
|
167
173
|
- test/helper.rb
|
168
174
|
- test/plugin/test_alias_template.json
|
169
175
|
- test/plugin/test_elasticsearch_error_handler.rb
|
176
|
+
- test/plugin/test_elasticsearch_fallback_selector.rb
|
170
177
|
- test/plugin/test_elasticsearch_index_lifecycle_management.rb
|
171
178
|
- test/plugin/test_elasticsearch_tls.rb
|
172
179
|
- test/plugin/test_filter_elasticsearch_genid.rb
|
@@ -204,6 +211,7 @@ test_files:
|
|
204
211
|
- test/helper.rb
|
205
212
|
- test/plugin/test_alias_template.json
|
206
213
|
- test/plugin/test_elasticsearch_error_handler.rb
|
214
|
+
- test/plugin/test_elasticsearch_fallback_selector.rb
|
207
215
|
- test/plugin/test_elasticsearch_index_lifecycle_management.rb
|
208
216
|
- test/plugin/test_elasticsearch_tls.rb
|
209
217
|
- test/plugin/test_filter_elasticsearch_genid.rb
|