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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ab0dd77a7749e31c5f80959ad351620d448c4127144a321385341e00884e2f1
4
- data.tar.gz: '002829c47fa544b91eb9b5727718ac68a2aab7270a4567fdd9f3ca3039b8ff15'
3
+ metadata.gz: 3be91761453634986640e4148217110f7959d27514bc5cd045421cd445b848ce
4
+ data.tar.gz: 9101e94faa8f5d499e7a9a2ab9ab7b5b7d4aeeb6b8f5dc8271f2173e7542fba5
5
5
  SHA512:
6
- metadata.gz: 3630b2cf30675a1b0e397ba06d7f005c392dad90144e417d828373ed666d0fddff85167b7bfa57f37c1d1089b7d25b69fefdd9a8cf74068d01018dae17393a07
7
- data.tar.gz: 196015f384b95ab35c73d4ddeaa2766a92242fd750a9d3432370317102cfbf4e756e7c181910f93cc39742cf8574e265b90720b458395cf576121464e8081b8b
6
+ metadata.gz: 8aceb999e49cee7de7d48a47169fd3735d27438970d30f15ecae1e6969c9a633bbff16f2c8082a228170ecd80b4d25b7ea74be334c98eccb8dbda32352e607d6
7
+ data.tar.gz: 51b5fbd6f169cb484340d08727b7627f553dfefa906f1b7e8c2eed42b322f04a271539695331b76661a35a30cc0423a943ff5d49ecaa1e73de1ea234a4bdb804
data/History.md CHANGED
@@ -4,6 +4,9 @@
4
4
  - Log ES response errors (#230)
5
5
  - Use latest elasticsearch-ruby (#240)
6
6
 
7
+ ### 2.8.2
8
+ - Revert content type header default value (#383)
9
+
7
10
  ### 2.8.1
8
11
  - Restore default value of type name #(377)
9
12
 
@@ -22,3 +22,4 @@ Provide example config and message
22
22
  * ES plugin 2.x.y or 1.x.y
23
23
  * paste boot log of fluentd or td-agent
24
24
  * paste result of ``fluent-gem list``, ``td-agent-gem list`` or your Gemfile.lock
25
+ * ES version (optional)
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/json`, elasticsearch plugin adds `application/json` as `Content-Type` in payload.
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/x-ndjson` which is encourage to use Elasticsearch bulk request.
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/json
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.1'
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/x-ndjson"
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/x-ndjson", instance.content_type
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/json
232
+ content_type application/x-ndjson
233
233
  }
234
234
  instance = driver(config).instance
235
- assert_equal :"application/json", instance.content_type
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/x-ndjson" })
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/x-ndjson", instance.content_type
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/json
104
+ content_type application/x-ndjson
105
105
  }
106
106
  instance = driver(config).instance
107
- assert_equal :"application/json", instance.content_type
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/x-ndjson" })
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.1
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-07 00:00:00.000000000 Z
12
+ date: 2018-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd