fluent-plugin-elasticsearch 1.11.0 → 1.11.1

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: 6d8cd27ced7ebf6f0c8d1a2026032b683af8eadd
4
- data.tar.gz: 98591a5682b51f4ca97fb206620cec059c57ca74
3
+ metadata.gz: 101b819a34a206c64e8829e72793158b8f5e448e
4
+ data.tar.gz: ffc95b8b3649186630a722e15dbe77f70ce7efa6
5
5
  SHA512:
6
- metadata.gz: c9291c5f41c33732d5dc467e6171446670c1deca8ec79d2c01085e1aeda17bec50206573cede541766a0a6ddce2a566c7d8cc5d2531a410173b2ea07ad98c11e
7
- data.tar.gz: c7c9c6badfddfd12190837ad504355d2758195c7318fef04b21ce67a0c6a051157a4b89aed074559f9f2696f7af9fc408d2f27ab07db0ae8c6e63214beee64bc
6
+ metadata.gz: caf081c1c9dcbf623bba5e649333b8e6790d9700c2931c0964cf8a0711f346d45355454a2d2e675d0e415252e77d76311a997d6e1cfbe64ab5290644c2d85dd6
7
+ data.tar.gz: e137b0dc4de293528fe907f60e06007ff51ac860ea0cf040974a246f799ea7e6e582a49ba6c2f804b0dacf2ad4784d9ba0a387185d4010cbc1c469990ceb1583
data/History.md CHANGED
@@ -4,6 +4,10 @@
4
4
  - Log ES response errors (#230)
5
5
  - Use latest elasticsearch-ruby (#240)
6
6
 
7
+ ### 1.11.1
8
+ - Raise ConfigError when specifying different @hash_config.hash_id_key and id_key configration (#326)
9
+ - backport small typo fix in README.md (#328)
10
+
7
11
  ### 1.11.0
8
12
  - backport adding bulk errors handling (#324)
9
13
 
data/README.md CHANGED
@@ -522,8 +522,9 @@ Here is a sample config:
522
522
 
523
523
  ```
524
524
  <hash>
525
- hash_id_key _id # storing generated hash id key
526
- <hash>
525
+ hash_id_key _hash # storing generated hash id key
526
+ </hash>
527
+ id_key _hash # specify same key name which is specified in hash_id_key
527
528
  ```
528
529
 
529
530
  ### Not seeing a config you need?
@@ -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.11.0'
6
+ s.version = '1.11.1'
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}
@@ -6,7 +6,7 @@ module Fluent
6
6
  def self.included(klass)
7
7
  klass.instance_eval {
8
8
  config_section :hash, param_name: :hash_config, required: false, multi: false do
9
- config_param :hash_id_key, :string, default: '_id'
9
+ config_param :hash_id_key, :string, default: '_hash'
10
10
  end
11
11
  }
12
12
  end
@@ -118,6 +118,10 @@ class Fluent::ElasticsearchOutput < Fluent::ObjectBufferedOutput
118
118
  if @password && m = @password.match(/%{(?<password>.*)}/)
119
119
  @password = URI.encode_www_form_component(m["password"])
120
120
  end
121
+
122
+ if @hash_config
123
+ raise Fluent::ConfigError, "@hash_config.hash_id_key and id_key must be equal." unless @hash_config.hash_id_key == @id_key
124
+ end
121
125
  end
122
126
 
123
127
  def create_meta_config_map
@@ -204,6 +204,21 @@ class ElasticsearchOutput < Test::Unit::TestCase
204
204
  assert_nil instance.client_key_pass
205
205
  end
206
206
 
207
+ def test_configure_with_invaild_generate_id_config
208
+ assert_raise(Fluent::ConfigError) {
209
+ driver.configure(Fluent::Config::Element.new(
210
+ 'ROOT', '', {
211
+ '@type' => 'elasticsearch',
212
+ 'id_key' =>'id_mismatch',
213
+ }, [
214
+ Fluent::Config::Element.new('hash', '', {
215
+ 'hash_id_key' => '_hash',
216
+ }, [])
217
+ ]
218
+ ))
219
+ }
220
+ end
221
+
207
222
  def test_template_already_present
208
223
  config = %{
209
224
  host logs.google.com
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.11.0
4
+ version: 1.11.1
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-11-20 00:00:00.000000000 Z
12
+ date: 2017-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd