fluent-plugin-elasticsearch 2.8.1 → 2.8.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/History.md +3 -0
- data/ISSUE_TEMPLATE.md +1 -0
- data/README.md +4 -3
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +1 -1
- data/test/plugin/test_out_elasticsearch.rb +4 -4
- data/test/plugin/test_out_elasticsearch_dynamic.rb +4 -4
- 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: 3be91761453634986640e4148217110f7959d27514bc5cd045421cd445b848ce
|
4
|
+
data.tar.gz: 9101e94faa8f5d499e7a9a2ab9ab7b5b7d4aeeb6b8f5dc8271f2173e7542fba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aceb999e49cee7de7d48a47169fd3735d27438970d30f15ecae1e6969c9a633bbff16f2c8082a228170ecd80b4d25b7ea74be334c98eccb8dbda32352e607d6
|
7
|
+
data.tar.gz: 51b5fbd6f169cb484340d08727b7627f553dfefa906f1b7e8c2eed42b322f04a271539695331b76661a35a30cc0423a943ff5d49ecaa1e73de1ea234a4bdb804
|
data/History.md
CHANGED
data/ISSUE_TEMPLATE.md
CHANGED
data/README.md
CHANGED
@@ -573,12 +573,13 @@ with_transporter_log true
|
|
573
573
|
|
574
574
|
### content_type
|
575
575
|
|
576
|
-
With `content_type application/
|
576
|
+
With `content_type application/x-ndjson`, elasticsearch plugin adds `application/x-ndjson` as `Content-Type` in payload.
|
577
577
|
|
578
|
-
Default value is `application/
|
578
|
+
Default value is `application/json` which is default Content-Type of Elasticsearch requests.
|
579
|
+
If you will not use template, it recommends to set `content_type application/x-ndjson`.
|
579
580
|
|
580
581
|
```
|
581
|
-
content_type application/
|
582
|
+
content_type application/x-ndjson
|
582
583
|
```
|
583
584
|
|
584
585
|
### Client/host certificate options
|
@@ -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.8.
|
6
|
+
s.version = '2.8.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}
|
@@ -80,7 +80,7 @@ EOC
|
|
80
80
|
config_param :reconnect_on_error, :bool, :default => false
|
81
81
|
config_param :pipeline, :string, :default => nil
|
82
82
|
config_param :with_transporter_log, :bool, :default => false
|
83
|
-
config_param :content_type, :enum, list: [:"application/json", :"application/x-ndjson"], :default => :"application/
|
83
|
+
config_param :content_type, :enum, list: [:"application/json", :"application/x-ndjson"], :default => :"application/json"
|
84
84
|
|
85
85
|
config_section :buffer do
|
86
86
|
config_set_default :@type, DEFAULT_BUFFER_TYPE
|
@@ -223,16 +223,16 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
223
223
|
assert_nil instance.client_cert
|
224
224
|
assert_nil instance.client_key_pass
|
225
225
|
assert_false instance.with_transporter_log
|
226
|
-
assert_equal :"application/
|
226
|
+
assert_equal :"application/json", instance.content_type
|
227
227
|
assert_equal "fluentd", default_type_name
|
228
228
|
end
|
229
229
|
|
230
230
|
test 'configure Content-Type' do
|
231
231
|
config = %{
|
232
|
-
content_type application/
|
232
|
+
content_type application/x-ndjson
|
233
233
|
}
|
234
234
|
instance = driver(config).instance
|
235
|
-
assert_equal :"application/
|
235
|
+
assert_equal :"application/x-ndjson", instance.content_type
|
236
236
|
end
|
237
237
|
|
238
238
|
test 'invalid Content-Type' do
|
@@ -648,7 +648,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
648
648
|
stub_request(:head, "http://localhost:9200/").
|
649
649
|
to_return(:status => 200, :body => "", :headers => {})
|
650
650
|
elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
|
651
|
-
with(headers: { "Content-Type" => "application/
|
651
|
+
with(headers: { "Content-Type" => "application/json" })
|
652
652
|
driver.run(default_tag: 'test') do
|
653
653
|
driver.feed(sample_record)
|
654
654
|
end
|
@@ -96,15 +96,15 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
96
96
|
assert_nil instance.client_cert
|
97
97
|
assert_nil instance.client_key_pass
|
98
98
|
assert_false instance.with_transporter_log
|
99
|
-
assert_equal :"application/
|
99
|
+
assert_equal :"application/json", instance.content_type
|
100
100
|
end
|
101
101
|
|
102
102
|
test 'configure Content-Type' do
|
103
103
|
config = %{
|
104
|
-
content_type application/
|
104
|
+
content_type application/x-ndjson
|
105
105
|
}
|
106
106
|
instance = driver(config).instance
|
107
|
-
assert_equal :"application/
|
107
|
+
assert_equal :"application/x-ndjson", instance.content_type
|
108
108
|
end
|
109
109
|
|
110
110
|
test 'invalid Content-Type' do
|
@@ -257,7 +257,7 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
257
257
|
stub_request(:head, "http://localhost:9200/").
|
258
258
|
to_return(:status => 200, :body => "", :headers => {})
|
259
259
|
elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
|
260
|
-
with(headers: { "Content-Type" => "application/
|
260
|
+
with(headers: { "Content-Type" => "application/json" })
|
261
261
|
driver.run(default_tag: 'test') do
|
262
262
|
driver.feed(sample_record)
|
263
263
|
end
|
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.8.
|
4
|
+
version: 2.8.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-03-
|
12
|
+
date: 2018-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|