fluent-plugin-elasticsearch 2.10.1 → 2.10.2

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
  SHA256:
3
- metadata.gz: 8e64450e9c4dca90c39c52e6c9bd2a6b3bc3958644f608fde7444c2024f68b62
4
- data.tar.gz: 05a52be8643cacf7e5301d50a6d545c7105acd84ffca1ba417551929d4c0fed4
3
+ metadata.gz: 17e838ba667a43b9522686a97dcf538954ea34492d8cad31336cc044b42196f7
4
+ data.tar.gz: c3b897eb2de3b7a230ab01a510b93b97890d44a6edc2477bd876a706838b94fb
5
5
  SHA512:
6
- metadata.gz: 3e6c52a7f807205e3f851039710b207f0afccdafd3fe9337a471e65752bc9aa8a5737790b33d0dc2e1a09569cad282cdc97450e3cffb23bef16907b9680cf521
7
- data.tar.gz: af806e72ce8af92c9486432feca7d2a5fc1f5c241d98de54af6301321864fb29a88c2a81be1c487bb81292947d9d970df10d95b6b683434910b0c52b82bbb589
6
+ metadata.gz: 64b2e894d5f6b89368b6d4fe3ec4e1cc2285ffc567a3916768e674e56e7b7ff037e133dc771b1824e33ef4026d59f3138f4cce8b697fff2e0616a6eb5b05ad5c
7
+ data.tar.gz: 4288d08df20a953ecafa2ccc31d0c5a72b844c211a27e7f256b64e0fb300cc4934f1ee60c717df2a866f7b664bfe5f7a616426a6bc97150d161c15d7f7cfe52e
data/History.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ### [Unreleased]
4
4
 
5
+ ### 2.10.2
6
+ - Use logstash_prefix_separator on elasticsearch_dynamic (#427)
7
+
5
8
  ### 2.10.1
6
9
  - Uplift Merge pull request #419 from jcantrill/retry_prefix (#421)
7
10
  - Uplift Merge pull request #418 from jcantrill/emit_exception (#420)
data/README.md CHANGED
@@ -311,7 +311,7 @@ The path to the file containing the template to install.
311
311
  Specify index templates in form of hash. Can contain multiple templates.
312
312
 
313
313
  ```
314
- templates { "templane_name_1": "path_to_template_1_file", "templane_name_2": "path_to_template_2_file"}
314
+ templates { "template_name_1": "path_to_template_1_file", "template_name_2": "path_to_template_2_file"}
315
315
  ```
316
316
 
317
317
  If `template_file` and `template_name` are set, then this parameter will be ignored.
@@ -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.10.1'
6
+ s.version = '2.10.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}
@@ -170,9 +170,9 @@ module Fluent::Plugin
170
170
 
171
171
  if eval_or_val(dynamic_conf['logstash_format'])
172
172
  if eval_or_val(dynamic_conf['utc_index'])
173
- target_index = "#{dynamic_conf['logstash_prefix']}-#{Time.at(time).getutc.strftime("#{dynamic_conf['logstash_dateformat']}")}"
173
+ target_index = "#{dynamic_conf['logstash_prefix']}#{@logstash_prefix_separator}#{Time.at(time).getutc.strftime("#{dynamic_conf['logstash_dateformat']}")}"
174
174
  else
175
- target_index = "#{dynamic_conf['logstash_prefix']}-#{Time.at(time).strftime("#{dynamic_conf['logstash_dateformat']}")}"
175
+ target_index = "#{dynamic_conf['logstash_prefix']}#{@logstash_prefix_separator}#{Time.at(time).strftime("#{dynamic_conf['logstash_dateformat']}")}"
176
176
  end
177
177
  else
178
178
  target_index = dynamic_conf['index_name']
@@ -426,6 +426,21 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
426
426
  assert_equal(logstash_index, index_cmds.first['index']['_index'])
427
427
  end
428
428
 
429
+ def test_writes_to_logstash_index_with_specified_prefix_and_separator
430
+ separator = '_'
431
+ driver.configure("logstash_format true
432
+ logstash_prefix_separator #{separator}
433
+ logstash_prefix myprefix")
434
+ time = Time.parse Date.today.iso8601
435
+ logstash_index = "myprefix#{separator}#{time.getutc.strftime("%Y.%m.%d")}"
436
+ stub_elastic_ping
437
+ stub_elastic
438
+ driver.run(default_tag: 'test') do
439
+ driver.feed(time.to_i, sample_record)
440
+ end
441
+ assert_equal(logstash_index, index_cmds.first['index']['_index'])
442
+ end
443
+
429
444
  def test_writes_to_logstash_index_with_specified_prefix_uppercase
430
445
  driver.configure("logstash_format true
431
446
  logstash_prefix MyPrefix")
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.10.1
4
+ version: 2.10.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-05-09 00:00:00.000000000 Z
12
+ date: 2018-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd