fluent-plugin-elasticsearch 1.9.3 → 1.9.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec35bcfd663fc3e9c9701ce0cb416916294d5688
|
4
|
+
data.tar.gz: 45e2ff5e1d5414fa57463dbaa524e9e7c25bcfd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 621d5699f57f1adb03f347d11598d61b3c7ea2a8a1791865b8dfe242d8abc8394b27df4756eb604f883fdd743d35c3443a847938575f25152b55529fd101f501
|
7
|
+
data.tar.gz: 97e7287bb4f8c553206521d0eb88dac9bb9e89d4c118c8bc19a26e7756534c4be6d289b5847274ac0c829ddca69927adf46a1fea1f3c477d364fa0fae4e93e65
|
@@ -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.9.
|
6
|
+
s.version = '1.9.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}
|
@@ -150,6 +150,7 @@ class Fluent::ElasticsearchOutput < Fluent::ObjectBufferedOutput
|
|
150
150
|
resurrect_after: @resurrect_after,
|
151
151
|
retry_on_failure: 5,
|
152
152
|
transport_options: {
|
153
|
+
headers: { 'Content-Type' => 'application/json' },
|
153
154
|
request: { timeout: @request_timeout },
|
154
155
|
ssl: { verify: @ssl_verify, ca_file: @ca_file }
|
155
156
|
}
|
@@ -48,6 +48,7 @@ class Fluent::ElasticsearchOutputDynamic < Fluent::ElasticsearchOutput
|
|
48
48
|
resurrect_after: @resurrect_after,
|
49
49
|
retry_on_failure: 5,
|
50
50
|
transport_options: {
|
51
|
+
headers: { 'Content-Type' => 'application/json' },
|
51
52
|
request: { timeout: @request_timeout },
|
52
53
|
ssl: { verify: @ssl_verify, ca_file: @ca_file }
|
53
54
|
}
|
@@ -326,6 +326,16 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
326
326
|
assert_equal nil, host1[:path]
|
327
327
|
end
|
328
328
|
|
329
|
+
def test_content_type_header
|
330
|
+
stub_request(:head, "http://localhost:9200/").
|
331
|
+
to_return(:status => 200, :body => "", :headers => {})
|
332
|
+
elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
|
333
|
+
with(headers: { "Content-Type" => "application/json" })
|
334
|
+
driver.emit(sample_record)
|
335
|
+
driver.run
|
336
|
+
assert_requested(elastic_request)
|
337
|
+
end
|
338
|
+
|
329
339
|
def test_writes_to_default_index
|
330
340
|
stub_elastic_ping
|
331
341
|
stub_elastic
|
@@ -154,6 +154,16 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
154
154
|
assert_equal nil, host1[:path]
|
155
155
|
end
|
156
156
|
|
157
|
+
def test_content_type_header
|
158
|
+
stub_request(:head, "http://localhost:9200/").
|
159
|
+
to_return(:status => 200, :body => "", :headers => {})
|
160
|
+
elastic_request = stub_request(:post, "http://localhost:9200/_bulk").
|
161
|
+
with(headers: { "Content-Type" => "application/json" })
|
162
|
+
driver.emit(sample_record)
|
163
|
+
driver.run
|
164
|
+
assert_requested(elastic_request)
|
165
|
+
end
|
166
|
+
|
157
167
|
def test_writes_to_default_index
|
158
168
|
stub_elastic_ping
|
159
169
|
stub_elastic
|
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.9.
|
4
|
+
version: 1.9.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: 2017-
|
12
|
+
date: 2017-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|