fluent-plugin-elasticsearch 1.13.3 → 1.13.4

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: 5f0bb600b3e421042e95cae076b456cf28b83acd7260ed91aea30174e42da279
4
- data.tar.gz: 29df2a1ade54adb459694ddccb5c9c04cee62e447a35580a08b45acc22b35244
3
+ metadata.gz: 35b11b6ba12d6bfa22a084db14fd4503d2f16769dc9db7d30d22dafa3dbad035
4
+ data.tar.gz: a0812a380eb81188fa705924ae51df7bbc773b0d565469f48540807bc323ec33
5
5
  SHA512:
6
- metadata.gz: e6007507bc7a5417c4e319e6d6875c29b4f95d84ac6e56bc60c2a35add576df2bb3bbedf5930104a1fbf599cd93c88471693cbaac222ca847c1c0db6e04d90bb
7
- data.tar.gz: b24a9ea5f7078d1268f234893fe50b5aafe0c98b65493c4ee1d1c4f7ceffc62c9aeb26a0d9fb5f6f16277766518c0f3879c22a084ad7eb3a1fb13dfe2b0c2245
6
+ metadata.gz: 942a5d5e57f7fa81697cdc13ad0024ab40df80d7a2a45a1108cd9acb1909ad87c5b0e4e220ce4df91d35949a12ae413fb0209c59d6f8ddb908beefa2c257799b
7
+ data.tar.gz: f4f4d3d3c1e0cb2800a31516052a5ca3aecd5ba0c451bcb3dcbf0e91d7e492bbf8da4caf4f1871d24e898276fb8758c76ae52813ade2ab6884bf061de73cff63
data/History.md CHANGED
@@ -1,8 +1,9 @@
1
1
  ## Changelog [[tags]](https://github.com/uken/fluent-plugin-elasticsearch/tags)
2
2
 
3
3
  ### [Unreleased]
4
- - Log ES response errors (#230)
5
- - Use latest elasticsearch-ruby (#240)
4
+
5
+ ### 1.13.4
6
+ - backport auth: Fix missing auth tokens after reloading connections (#397)
6
7
 
7
8
  ### 1.13.3
8
9
  - backport removing outdated generating hash id support module (#374)
@@ -59,6 +60,10 @@
59
60
  ### 1.9.4
60
61
  - Include 'Content-Type' header in `transport_options`
61
62
 
63
+ ### 1.9.3
64
+ - Use latest elasticsearch-ruby (#240)
65
+ - Log ES response errors (#230)
66
+
62
67
  ### 1.9.2
63
68
  - Fix elasticsearch_dynamic for v0.14 (#224)
64
69
 
data/README.md CHANGED
@@ -90,19 +90,13 @@ This plugin creates Elasticsearch indices by merely writing to them. Consider us
90
90
 
91
91
  ```
92
92
  hosts host1:port1,host2:port2,host3:port3
93
- # or
94
- hosts https://customhost.com:443/path,https://username:password@host-failover.com:443
95
93
  ```
96
94
 
97
95
  You can specify multiple Elasticsearch hosts with separator ",".
98
96
 
99
97
  If you specify multiple hosts, this plugin will load balance updates to Elasticsearch. This is an [elasticsearch-ruby](https://github.com/elasticsearch/elasticsearch-ruby) feature, the default strategy is round-robin.
100
98
 
101
- And this plugin will escape required URL encoded characters within `%{}` placeholders.
102
-
103
- ```
104
- hosts https://%{j+hn}:%{passw@rd}@host1:443/elastic/,http://host2
105
- ```
99
+ **Note:** Up until v1.13.3, it was allowed to embed the username/password in the URL. However, this syntax is deprecated as of v1.13.4 because it was found to cause serious connection problems (See #394). Please migrate your settings to use the `user` and `password` field (described below) instead.
106
100
 
107
101
  ### user, password, path, scheme, ssl_verify
108
102
 
@@ -115,7 +109,7 @@ path /elastic_search/
115
109
  scheme https
116
110
  ```
117
111
 
118
- You can specify user and password for HTTP basic auth. If used in conjunction with a hosts list, then these options will be used by default i.e. if you do not provide any of these options within the hosts listed.
112
+ You can specify user and password for HTTP Basic authentication.
119
113
 
120
114
  And this plugin will escape required URL encoded characters within `%{}` placeholders.
121
115
 
@@ -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 = '1.13.3'
6
+ s.version = '1.13.4'
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}
@@ -182,6 +182,10 @@ class Fluent::ElasticsearchOutput < Fluent::ObjectBufferedOutput
182
182
  headers: { 'Content-Type' => 'application/json' },
183
183
  request: { timeout: @request_timeout },
184
184
  ssl: { verify: @ssl_verify, ca_file: @ca_file, version: @ssl_version }
185
+ },
186
+ http: {
187
+ user: @user,
188
+ password: @password
185
189
  }
186
190
  }), &adapter_conf)
187
191
  es = Elasticsearch::Client.new transport: transport
@@ -52,6 +52,10 @@ class Fluent::ElasticsearchOutputDynamic < Fluent::ElasticsearchOutput
52
52
  headers: { 'Content-Type' => 'application/json' },
53
53
  request: { timeout: @request_timeout },
54
54
  ssl: { verify: @ssl_verify, ca_file: @ca_file }
55
+ },
56
+ http: {
57
+ user: @user,
58
+ password: @password
55
59
  }
56
60
  }), &adapter_conf)
57
61
  es = Elasticsearch::Client.new transport: transport
@@ -580,8 +580,13 @@ class ElasticsearchOutput < Test::Unit::TestCase
580
580
  def test_content_type_header
581
581
  stub_request(:head, "http://localhost:9200/").
582
582
  to_return(:status => 200, :body => "", :headers => {})
583
- elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
584
- with(headers: { "Content-Type" => "application/json" })
583
+ if Elasticsearch::VERSION >= "6.0.2"
584
+ elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
585
+ with(headers: { "Content-Type" => "application/x-ndjson" })
586
+ else
587
+ elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
588
+ with(headers: { "Content-Type" => "application/json" })
589
+ end
585
590
  driver.emit(sample_record)
586
591
  driver.run
587
592
  assert_requested(elastic_request)
@@ -210,8 +210,13 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
210
210
  def test_content_type_header
211
211
  stub_request(:head, "http://localhost:9200/").
212
212
  to_return(:status => 200, :body => "", :headers => {})
213
- elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
214
- with(headers: { "Content-Type" => "application/json" })
213
+ if Elasticsearch::VERSION >= "6.0.2"
214
+ elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
215
+ with(headers: { "Content-Type" => "application/x-ndjson" })
216
+ else
217
+ elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
218
+ with(headers: { "Content-Type" => "application/json" })
219
+ end
215
220
  driver.emit(sample_record)
216
221
  driver.run
217
222
  assert_requested(elastic_request)
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: 1.13.3
4
+ version: 1.13.4
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-05 00:00:00.000000000 Z
12
+ date: 2018-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.7.3
178
+ rubygems_version: 2.7.6
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Elasticsearch output plugin for Fluent event collector