fluent-plugin-elasticsearch 1.13.2 → 1.13.3
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 +4 -1
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +0 -2
- data/lib/fluent/plugin/out_elasticsearch_dynamic.rb +0 -2
- data/test/plugin/test_out_elasticsearch.rb +0 -36
- data/test/plugin/test_out_elasticsearch_dynamic.rb +0 -21
- metadata +2 -3
- data/lib/fluent/plugin/generate_hash_id_support.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f0bb600b3e421042e95cae076b456cf28b83acd7260ed91aea30174e42da279
|
4
|
+
data.tar.gz: 29df2a1ade54adb459694ddccb5c9c04cee62e447a35580a08b45acc22b35244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6007507bc7a5417c4e319e6d6875c29b4f95d84ac6e56bc60c2a35add576df2bb3bbedf5930104a1fbf599cd93c88471693cbaac222ca847c1c0db6e04d90bb
|
7
|
+
data.tar.gz: b24a9ea5f7078d1268f234893fe50b5aafe0c98b65493c4ee1d1c4f7ceffc62c9aeb26a0d9fb5f6f16277766518c0f3879c22a084ad7eb3a1fb13dfe2b0c2245
|
data/History.md
CHANGED
@@ -4,8 +4,11 @@
|
|
4
4
|
- Log ES response errors (#230)
|
5
5
|
- Use latest elasticsearch-ruby (#240)
|
6
6
|
|
7
|
+
### 1.13.3
|
8
|
+
- backport removing outdated generating hash id support module (#374)
|
9
|
+
|
7
10
|
### 1.13.2
|
8
|
-
- backport preventing error when using template in elasticsearch_dynamic for elementally use case (#
|
11
|
+
- backport preventing error when using template in elasticsearch_dynamic for elementally use case (#364)
|
9
12
|
|
10
13
|
### 1.13.1
|
11
14
|
- backport adding config parameter to enable elasticsearch-ruby's transporter logging (#343)
|
@@ -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.
|
6
|
+
s.version = '1.13.3'
|
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}
|
@@ -13,7 +13,6 @@ require 'fluent/output'
|
|
13
13
|
require_relative 'elasticsearch_constants'
|
14
14
|
require_relative 'elasticsearch_error_handler'
|
15
15
|
require_relative 'elasticsearch_index_template'
|
16
|
-
require_relative 'generate_hash_id_support'
|
17
16
|
|
18
17
|
class Fluent::ElasticsearchOutput < Fluent::ObjectBufferedOutput
|
19
18
|
class ConnectionFailure < StandardError; end
|
@@ -72,7 +71,6 @@ class Fluent::ElasticsearchOutput < Fluent::ObjectBufferedOutput
|
|
72
71
|
config_param :with_transporter_log, :bool, :default => false
|
73
72
|
|
74
73
|
include Fluent::ElasticsearchIndexTemplate
|
75
|
-
include Fluent::GenerateHashIdSupport
|
76
74
|
include Fluent::ElasticsearchConstants
|
77
75
|
|
78
76
|
def initialize
|
@@ -10,8 +10,6 @@ class Fluent::ElasticsearchOutputDynamic < Fluent::ElasticsearchOutput
|
|
10
10
|
DYNAMIC_PARAM_NAMES = %W[hosts host port include_timestamp logstash_format logstash_prefix logstash_dateformat time_key utc_index index_name tag_key type_name id_key parent_key routing_key write_operation]
|
11
11
|
DYNAMIC_PARAM_SYMBOLS = DYNAMIC_PARAM_NAMES.map { |n| "@#{n}".to_sym }
|
12
12
|
|
13
|
-
include Fluent::GenerateHashIdSupport
|
14
|
-
|
15
13
|
attr_reader :dynamic_config
|
16
14
|
|
17
15
|
def configure(conf)
|
@@ -205,21 +205,6 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
205
205
|
assert_false instance.with_transporter_log
|
206
206
|
end
|
207
207
|
|
208
|
-
def test_configure_with_invaild_generate_id_config
|
209
|
-
assert_raise_message(/Use bundled filter-elasticsearch-genid instead./) do
|
210
|
-
driver.configure(Fluent::Config::Element.new(
|
211
|
-
'ROOT', '', {
|
212
|
-
'@type' => 'elasticsearch',
|
213
|
-
'id_key' =>'id_mismatch',
|
214
|
-
}, [
|
215
|
-
Fluent::Config::Element.new('hash', '', {
|
216
|
-
'hash_id_key' => '_hash',
|
217
|
-
}, [])
|
218
|
-
]
|
219
|
-
))
|
220
|
-
end
|
221
|
-
end
|
222
|
-
|
223
208
|
def test_template_already_present
|
224
209
|
config = %{
|
225
210
|
host logs.google.com
|
@@ -627,27 +612,6 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
627
612
|
assert_equal('myindex', index_cmds.first['index']['_index'])
|
628
613
|
end
|
629
614
|
|
630
|
-
class AdditionalHashIdMechanismTest < self
|
631
|
-
data("default" => {"hash_id_key" => '_id'},
|
632
|
-
"custom hash_id_key" => {"hash_id_key" => '_hash_id'},
|
633
|
-
)
|
634
|
-
def test_writes_with_genrate_hash(data)
|
635
|
-
assert_raise_message(/Use bundled filter-elasticsearch-genid instead./) do
|
636
|
-
driver.configure(Fluent::Config::Element.new(
|
637
|
-
'ROOT', '', {
|
638
|
-
'@type' => 'elasticsearch',
|
639
|
-
'id_key' => data["hash_id_key"],
|
640
|
-
}, [
|
641
|
-
Fluent::Config::Element.new('hash', '', {
|
642
|
-
'keys' => ['request_id'],
|
643
|
-
'hash_id_key' => data["hash_id_key"],
|
644
|
-
}, [])
|
645
|
-
]
|
646
|
-
))
|
647
|
-
end
|
648
|
-
end
|
649
|
-
end
|
650
|
-
|
651
615
|
def test_writes_to_speficied_index_uppercase
|
652
616
|
driver.configure("index_name MyIndex\n")
|
653
617
|
stub_elastic_ping
|
@@ -309,27 +309,6 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
|
|
309
309
|
assert_equal(2000, total)
|
310
310
|
end
|
311
311
|
|
312
|
-
class AdditionalHashIdMechanismTest < self
|
313
|
-
data("default" => {"hash_id_key" => '_id'},
|
314
|
-
"custom hash_id_key" => {"hash_id_key" => '_hash_id'},
|
315
|
-
)
|
316
|
-
def test_writes_with_genrate_hash(data)
|
317
|
-
assert_raise_message(/Use bundled filter-elasticsearch-genid instead./) do
|
318
|
-
driver.configure(Fluent::Config::Element.new(
|
319
|
-
'ROOT', '', {
|
320
|
-
'@type' => 'elasticsearch',
|
321
|
-
'id_key' => data["hash_id_key"],
|
322
|
-
}, [
|
323
|
-
Fluent::Config::Element.new('hash', '', {
|
324
|
-
'keys' => ['request_id'],
|
325
|
-
'hash_id_key' => data["hash_id_key"],
|
326
|
-
}, [])
|
327
|
-
]
|
328
|
-
))
|
329
|
-
end
|
330
|
-
end
|
331
|
-
end
|
332
|
-
|
333
312
|
def test_makes_bulk_request
|
334
313
|
stub_elastic_ping
|
335
314
|
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.13.
|
4
|
+
version: 1.13.3
|
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-
|
12
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -148,7 +148,6 @@ files:
|
|
148
148
|
- lib/fluent/plugin/elasticsearch_error_handler.rb
|
149
149
|
- lib/fluent/plugin/elasticsearch_index_template.rb
|
150
150
|
- lib/fluent/plugin/filter_elasticsearch_genid.rb
|
151
|
-
- lib/fluent/plugin/generate_hash_id_support.rb
|
152
151
|
- lib/fluent/plugin/out_elasticsearch.rb
|
153
152
|
- lib/fluent/plugin/out_elasticsearch_dynamic.rb
|
154
153
|
- test/helper.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'securerandom'
|
2
|
-
require 'base64'
|
3
|
-
|
4
|
-
module Fluent
|
5
|
-
module GenerateHashIdSupport
|
6
|
-
def self.included(klass)
|
7
|
-
klass.instance_eval {
|
8
|
-
config_section :hash, param_name: :hash_config, required: false, multi: false do
|
9
|
-
config_param :hash_id_key, :string, default: '_hash',
|
10
|
-
obsoleted: "Use bundled filter-elasticsearch-genid instead."
|
11
|
-
|
12
|
-
end
|
13
|
-
}
|
14
|
-
end
|
15
|
-
|
16
|
-
def generate_hash_id_key(record)
|
17
|
-
s = ""
|
18
|
-
s += Base64.strict_encode64(SecureRandom.uuid)
|
19
|
-
record[@hash_config.hash_id_key] = s
|
20
|
-
record
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|