fluent-plugin-elasticsearch 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +9 -0
- data/History.md +3 -0
- data/fluent-plugin-elasticsearch.gemspec +3 -2
- data/lib/fluent/plugin/out_elasticsearch.rb +4 -4
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c59dd5df9cd9a3ae7cb7e32b79fce58855888dbe
|
4
|
+
data.tar.gz: 3bb7808c913b37088eb610bb62a59394da068f0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcd423ab475f32322b88467b74456c290196d5dc9ffb9afddbaa845a91852875f64eedaf84edd77f68c56a56db99102d96077cd31e8ce3fc691a370976ed905e
|
7
|
+
data.tar.gz: f7bd63fe77c03c7d9e889869c1cc06d1f4a266be4eb503bfdd708b6cee133c1dde5bb03e0415ff85606a8d94f377837ed2962b5d912d90eb45fbfd36635a2542
|
data/.editorconfig
ADDED
data/History.md
CHANGED
@@ -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.
|
6
|
+
s.version = '0.8.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}
|
@@ -17,9 +17,10 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_paths = ['lib']
|
18
18
|
|
19
19
|
s.add_runtime_dependency 'fluentd', '>= 0.10.43'
|
20
|
-
s.add_runtime_dependency '
|
20
|
+
s.add_runtime_dependency 'excon', '>= 0'
|
21
21
|
s.add_runtime_dependency 'elasticsearch', '>= 0'
|
22
22
|
|
23
|
+
|
23
24
|
s.add_development_dependency 'rake', '~> 0'
|
24
25
|
s.add_development_dependency 'webmock', '~> 1'
|
25
26
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require 'date'
|
3
|
-
require '
|
3
|
+
require 'excon'
|
4
4
|
require 'elasticsearch'
|
5
5
|
require 'uri'
|
6
6
|
|
@@ -46,7 +46,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
46
46
|
|
47
47
|
def client
|
48
48
|
@_es ||= begin
|
49
|
-
adapter_conf = lambda {|f| f.adapter :
|
49
|
+
adapter_conf = lambda {|f| f.adapter :excon }
|
50
50
|
transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new(get_connection_options.merge(
|
51
51
|
options: {
|
52
52
|
reload_connections: @reload_connections,
|
@@ -60,7 +60,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
60
60
|
|
61
61
|
begin
|
62
62
|
raise ConnectionFailure, "Can not reach Elasticsearch cluster (#{connection_options_description})!" unless es.ping
|
63
|
-
rescue
|
63
|
+
rescue *es.transport.host_unreachable_exceptions => e
|
64
64
|
raise ConnectionFailure, "Can not reach Elasticsearch cluster (#{connection_options_description})! #{e.message}"
|
65
65
|
end
|
66
66
|
|
@@ -166,7 +166,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
166
166
|
retries = 0
|
167
167
|
begin
|
168
168
|
client.bulk body: data
|
169
|
-
rescue
|
169
|
+
rescue *client.transport.host_unreachable_exceptions => e
|
170
170
|
if retries < 2
|
171
171
|
retries += 1
|
172
172
|
@_es = nil
|
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.
|
4
|
+
version: 0.8.0
|
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:
|
12
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -26,17 +26,17 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 0.10.43
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: excon
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
@@ -89,6 +89,7 @@ executables: []
|
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
|
+
- ".editorconfig"
|
92
93
|
- ".gitignore"
|
93
94
|
- ".travis.yml"
|
94
95
|
- Gemfile
|
@@ -127,3 +128,4 @@ summary: ElasticSearch output plugin for Fluent event collector
|
|
127
128
|
test_files:
|
128
129
|
- test/helper.rb
|
129
130
|
- test/plugin/test_out_elasticsearch.rb
|
131
|
+
has_rdoc:
|