fluent-plugin-elasticsearch 0.5.1 → 0.6.0

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.
data/History.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ### Future
4
4
 
5
+ ### 0.6.0
6
+ - added `reload_on_failure` and `reload_connections` flags (#78)
5
7
 
6
8
  ### 0.5.1
7
9
 
data/README.md CHANGED
@@ -95,6 +95,21 @@ You can specify HTTP request timeout.
95
95
 
96
96
  This is useful when Elasticsearch cannot return response for bulk request within the default of 5 seconds.
97
97
 
98
+ ```
99
+ reload_connections false # defaults to true
100
+ ```
101
+
102
+ You can tune how the elasticsearch-transport host reloading feature works. By default it will reload the host list from the server
103
+ every 10,000th request to spread the load. This can be an issue if your ElasticSearch cluster is behind a Reverse Proxy,
104
+ as fluentd process may not have direct network access to the ElasticSearch nodes.
105
+
106
+ ```
107
+ reload_on_failure true # defaults to false
108
+ ```
109
+
110
+ Indicates that the elasticsearch-transport will try to reload the nodes addresses if there is a failure while making the
111
+ request, this can be useful to quickly remove a dead node from the list of addresses.
112
+
98
113
  ---
99
114
 
100
115
  ```
@@ -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 = '0.5.1'
6
+ s.version = '0.6.0'
7
7
  s.authors = ['diogo', 'pitr']
8
8
  s.email = ['pitr@uken.com', 'diogo@uken.com']
9
9
  s.description = %q{ElasticSearch output plugin for Fluent event collector}
@@ -25,6 +25,8 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
25
25
  config_param :id_key, :string, :default => nil
26
26
  config_param :parent_key, :string, :default => nil
27
27
  config_param :request_timeout, :time, :default => 5
28
+ config_param :reload_connections, :bool, :default => true
29
+ config_param :reload_on_failure, :bool, :default => false
28
30
 
29
31
  include Fluent::SetTagKeyMixin
30
32
  config_set_default :include_tag_key, false
@@ -46,7 +48,8 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
46
48
  adapter_conf = lambda {|f| f.adapter :patron }
47
49
  transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new(get_connection_options.merge(
48
50
  options: {
49
- reload_connections: true,
51
+ reload_connections: @reload_connections,
52
+ reload_on_failure: @reload_on_failure,
50
53
  retry_on_failure: 5,
51
54
  transport_options: {
52
55
  request: { timeout: @request_timeout }
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: 0.5.1
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-10-07 00:00:00.000000000 Z
13
+ date: 2014-10-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: 1536252562969787484
129
+ hash: -4455039965937984873
130
130
  required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  none: false
132
132
  requirements:
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  segments:
137
137
  - 0
138
- hash: 1536252562969787484
138
+ hash: -4455039965937984873
139
139
  requirements: []
140
140
  rubyforge_project:
141
141
  rubygems_version: 1.8.23