fluent-plugin-elasticsearch 2.4.0 → 2.4.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: c29f67bc984aa2da3c26d64f4eb8b39a696ec45a
4
- data.tar.gz: 5c3b38d9a83cce6c3b6dd0c6cfec3cb258b93801
3
+ metadata.gz: 7818d400af943a625cb1b193e512885f38118b83
4
+ data.tar.gz: aa62c55e4d724d7bd5b913ebd3dd33a9ac49f503
5
5
  SHA512:
6
- metadata.gz: ab8603053553d60e49b37eefea82d5dab6d6ef051225e4765907de6139d749231b2d7dec145c06d1d72396deadb0c02cccb441f73061e98c20fbe8799a1ee69d
7
- data.tar.gz: 3c59c0982680b9cb23a50abd6e5d89d5251809047c39ff54371285b93400446a082048ed285c8e56738dca76245b1ef46f50ab395cf07f26dca1e74d6097aeed
6
+ metadata.gz: 045b1b49e09d1499e15c7bf8b260f4a1316780bfabfed18bb3eef0ffcb13d3eadee21d2307c45810bda4b9df4caf2bbafce155948c8f86d6b96f8710f1e858bf
7
+ data.tar.gz: 69b16b63ec8616b3db021a61b4778c3e5ea59c66a70958e29eea239906c82d3299b161f301b7d4221ccc7ac35dd458a12f77855379dd20ddf3af69a46d855e8e
data/History.md CHANGED
@@ -4,6 +4,9 @@
4
4
  - Log ES response errors (#230)
5
5
  - Use latest elasticsearch-ruby (#240)
6
6
 
7
+ ### 2.4.1
8
+ - Add config parameter to enable elasticsearch-ruby's transporter logging (#342)
9
+
7
10
  ### 2.4.0
8
11
  - Add built-in placeholders support against type_name parameter (#338)
9
12
 
data/README.md CHANGED
@@ -50,6 +50,7 @@ Current maintainers: @cosmo0920
50
50
  + [write_operation](#write_operation)
51
51
  + [time_parse_error_tag](#time_parse_error_tag)
52
52
  + [reconnect_on_error](#reconnect_on_error)
53
+ + [with_transporter_log](#with_transporter_log)
53
54
  + [Client/host certificate options](#clienthost-certificate-options)
54
55
  + [Proxy Support](#proxy-support)
55
56
  + [Buffer options](#buffer-options)
@@ -506,6 +507,17 @@ We recommended to set this true in the presence of elasticsearch shield.
506
507
  reconnect_on_error true # defaults to false
507
508
  ```
508
509
 
510
+ ### with_transporter_log
511
+
512
+ This is debugging purpose option to enable to obtain transporter layer log.
513
+ Default value is `false` for backward compatibility.
514
+
515
+ We recommend to set this true if you start to debug this plugin.
516
+
517
+ ```
518
+ with_transporter_log true
519
+ ```
520
+
509
521
  ### Client/host certificate options
510
522
 
511
523
  Need to verify ElasticSearch's certificate? You can use the following parameter to specify a CA instead of using an environment variable.
@@ -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.4.0'
6
+ s.version = '2.4.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}
@@ -74,7 +74,7 @@ module Fluent::Plugin
74
74
  config_param :time_parse_error_tag, :string, :default => 'Fluent::ElasticsearchOutput::TimeParser.error'
75
75
  config_param :reconnect_on_error, :bool, :default => false
76
76
  config_param :pipeline, :string, :default => nil
77
-
77
+ config_param :with_transporter_log, :bool, :default => false
78
78
 
79
79
  config_section :buffer do
80
80
  config_set_default :@type, DEFAULT_BUFFER_TYPE
@@ -139,6 +139,12 @@ module Fluent::Plugin
139
139
  if @hash_config
140
140
  raise Fluent::ConfigError, "@hash_config.hash_id_key and id_key must be equal." unless @hash_config.hash_id_key == @id_key
141
141
  end
142
+ @transport_logger = nil
143
+ if @with_transporter_log
144
+ @transport_logger = log
145
+ log_level = conf['@log_level'] || conf['log_level']
146
+ log.warn "Consider to specify log_level with @log_level." unless log_level
147
+ end
142
148
  end
143
149
 
144
150
  def create_meta_config_map
@@ -187,6 +193,7 @@ module Fluent::Plugin
187
193
  reload_on_failure: @reload_on_failure,
188
194
  resurrect_after: @resurrect_after,
189
195
  retry_on_failure: 5,
196
+ logger: @transport_logger,
190
197
  transport_options: {
191
198
  headers: { 'Content-Type' => 'application/json' },
192
199
  request: { timeout: @request_timeout },
@@ -52,6 +52,7 @@ module Fluent::Plugin
52
52
  reload_on_failure: @reload_on_failure,
53
53
  resurrect_after: @resurrect_after,
54
54
  retry_on_failure: 5,
55
+ logger: @transport_logger,
55
56
  transport_options: {
56
57
  headers: { 'Content-Type' => 'application/json' },
57
58
  request: { timeout: @request_timeout },
@@ -205,6 +205,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
205
205
  assert_nil instance.client_key
206
206
  assert_nil instance.client_cert
207
207
  assert_nil instance.client_key_pass
208
+ assert_false instance.with_transporter_log
208
209
  end
209
210
 
210
211
  test 'lack of tag in chunk_keys' do
@@ -78,6 +78,7 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
78
78
  assert_nil instance.client_key
79
79
  assert_nil instance.client_cert
80
80
  assert_nil instance.client_key_pass
81
+ assert_false instance.with_transporter_log
81
82
  end
82
83
 
83
84
  def test_defaults
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.4.0
4
+ version: 2.4.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-30 00:00:00.000000000 Z
12
+ date: 2017-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd