fluent-plugin-elasticsearch 2.11.1 → 2.11.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: 13413388e6afd8f9a4676e70d15952f5f2305876aac4499814f79b11b8613679
4
- data.tar.gz: bb54ccf3fd39f494e62f1425fbb54558e4a6c3fe116fe5995c8905dd0b9de52a
3
+ metadata.gz: 6a4e029357f6bb2c914d2754eb9752a88d774e9eb326cb10f52a6d56d3e3ce09
4
+ data.tar.gz: b756fbd56d5c830df97f32b97d3f9f9f8593253c59a9861a7d3f8c2ae9d47220
5
5
  SHA512:
6
- metadata.gz: 89b96d887e5a342c3d28db5109eb14b7a0b46179110ff9359166c4526377b7cfd507d7dfb9af4210697562ce8800d764f48f8c760f4e5719a08f4cc2857b99c3
7
- data.tar.gz: 8d0d6b4dc17edac48dc986f119fca2dd27d3df89ed44f44fb8e155af679d8be8a563d8ae150aa05c0383607852eae15ac8b32e2ec071a8ab56a027c670da6ec6
6
+ metadata.gz: 6fa642ed492678b604eb7e8ff5a51e3f03cbe27929d64608432ee538ab98c3f6ca42f5dca63c6434d3290c977f3740445dbb9c3742d7d85faf43603432a491a1
7
+ data.tar.gz: 843ad9a1fcc3174871e1762a1843839ef9291bb2e862fee331f0b5f8b79f770273295d3c5fef0b0897708b325345110e19afe8a346dd99126c8ba7f0d2cfd98e
data/History.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ### [Unreleased]
4
4
 
5
+ ### 2.11.2
6
+ - Strictness scheme (#445)
7
+
5
8
  ### 2.11.0
6
9
  - Uplift Merge pull request #437 from jcantrill/fix_bulk_count (#438)
7
10
 
@@ -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.11.1'
6
+ s.version = '2.11.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}
@@ -48,7 +48,7 @@ module Fluent::Plugin
48
48
  config_param :user, :string, :default => nil
49
49
  config_param :password, :string, :default => nil, :secret => true
50
50
  config_param :path, :string, :default => nil
51
- config_param :scheme, :string, :default => 'http'
51
+ config_param :scheme, :enum, :list => [:https, :http], :default => :http
52
52
  config_param :hosts, :string, :default => nil
53
53
  config_param :target_index_key, :string, :default => nil
54
54
  config_param :target_type_key, :string, :default => nil,
@@ -196,8 +196,10 @@ EOC
196
196
  if @last_seen_major_version >= 6
197
197
  case @ssl_version
198
198
  when :SSLv23, :TLSv1, :TLSv1_1
199
- log.warn "Detected ES 6.x or above and enabled insecure security:
200
- You might have to specify `ssl_version TLSv1_2` in configuration."
199
+ if @scheme == :https
200
+ log.warn "Detected ES 6.x or above and enabled insecure security:
201
+ You might have to specify `ssl_version TLSv1_2` in configuration."
202
+ end
201
203
  end
202
204
  end
203
205
  end
@@ -306,7 +308,7 @@ EOC
306
308
  {
307
309
  host: host_str.split(':')[0],
308
310
  port: (host_str.split(':')[1] || @port).to_i,
309
- scheme: @scheme
311
+ scheme: @scheme.to_s
310
312
  }
311
313
  else
312
314
  # New hosts format expects URLs such as http://logs.foo.com,https://john:pass@logs2.foo.com/elastic
@@ -318,7 +320,7 @@ EOC
318
320
  end
319
321
  end.compact
320
322
  else
321
- [{host: @host, port: @port, scheme: @scheme}]
323
+ [{host: @host, port: @port, scheme: @scheme.to_s}]
322
324
  end.each do |host|
323
325
  host.merge!(user: @user, password: @password) if !host[:user] && @user
324
326
  host.merge!(path: @path) if !host[:path] && @path
@@ -84,7 +84,7 @@ module Fluent::Plugin
84
84
  {
85
85
  host: host_str.split(':')[0],
86
86
  port: (host_str.split(':')[1] || @port).to_i,
87
- scheme: @scheme
87
+ scheme: @scheme.to_s
88
88
  }
89
89
  else
90
90
  # New hosts format expects URLs such as http://logs.foo.com,https://john:pass@logs2.foo.com/elastic
@@ -96,7 +96,7 @@ module Fluent::Plugin
96
96
  end
97
97
  end.compact
98
98
  else
99
- [{host: @host, port: @port.to_i, scheme: @scheme}]
99
+ [{host: @host, port: @port.to_i, scheme: @scheme.to_s}]
100
100
  end.each do |host|
101
101
  host.merge!(user: @user, password: @password) if !host[:user] && @user
102
102
  host.merge!(path: @path) if !host[:path] && @path
@@ -196,7 +196,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
196
196
 
197
197
  assert_equal 'logs.google.com', instance.host
198
198
  assert_equal 777, instance.port
199
- assert_equal 'https', instance.scheme
199
+ assert_equal :https, instance.scheme
200
200
  assert_equal '/es/', instance.path
201
201
  assert_equal 'john', instance.user
202
202
  assert_equal 'doe', instance.password
@@ -247,6 +247,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
247
247
  config = %{
248
248
  ssl_version TLSv1_1
249
249
  @log_level warn
250
+ scheme https
250
251
  }
251
252
  instance = driver(config, 6).instance
252
253
  logs = driver.logs
@@ -257,6 +258,7 @@ class ElasticsearchOutput < Test::Unit::TestCase
257
258
  config = %{
258
259
  ssl_version TLSv1_2
259
260
  @log_level warn
261
+ scheme https
260
262
  }
261
263
  instance = driver(config, 7).instance
262
264
  logs = driver.logs
@@ -88,6 +88,7 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
88
88
  conf = instance.dynamic_config
89
89
  assert_equal 'logs.google.com', conf['host']
90
90
  assert_equal "777", conf['port']
91
+ assert_equal :https, instance.scheme
91
92
  assert_equal 'john', instance.user
92
93
  assert_equal 'doe', instance.password
93
94
  assert_equal '/es/', instance.path
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.11.1
4
+ version: 2.11.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-07-02 00:00:00.000000000 Z
12
+ date: 2018-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd