fluent-plugin-elasticsearch 0.3.1 → 0.4.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.
- checksums.yaml +7 -0
- data/History.md +9 -0
- data/README.md +8 -0
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +6 -1
- data/test/plugin/test_out_elasticsearch.rb +7 -0
- metadata +19 -31
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eb97386663d594fba5f8370521ec652d8421be24
|
4
|
+
data.tar.gz: ee4c8b7df8eedab7a49928a8501d125acee07d81
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1e18d1b311ac77e067fead2acd4e4dcbfafad8e1930f60d041195024da6aa8f1993e068af25ad2ce58f95a6c87f746baf254aadbc48a8612c82c43fdf747f7c3
|
7
|
+
data.tar.gz: 226358388cf4cdb2916bbba8c7272e019f257bcb8b964d1e1b839f7a6be4aa6aee9688a917ae20b2f02982863ac43b0a1b9125ce1879baa8bda30a0db4e09e40
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -67,6 +67,14 @@ utc_index true
|
|
67
67
|
|
68
68
|
By default, the records inserted into index `logstash-YYMMDD` with utc (Coordinated Universal Time). This option allows to use local time if you describe utc_index to false.
|
69
69
|
|
70
|
+
```
|
71
|
+
request_timeout 15s # defaults to 5s
|
72
|
+
```
|
73
|
+
|
74
|
+
You can specify HTTP request timeout.
|
75
|
+
|
76
|
+
This is useful when Elasticsearch cannot return response for bulk request within the default of 5 seconds.
|
77
|
+
|
70
78
|
---
|
71
79
|
|
72
80
|
```
|
@@ -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.4.0'
|
7
7
|
s.authors = ['diogo', 'pitr']
|
8
8
|
s.email = ['team@uken.com']
|
9
9
|
s.description = %q{ElasticSearch output plugin for Fluent event collector}
|
@@ -17,6 +17,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
17
17
|
config_param :id_key, :string, :default => nil
|
18
18
|
config_param :parent_key, :string, :default => nil
|
19
19
|
config_param :hosts, :string, :default => nil
|
20
|
+
config_param :request_timeout, :time, :default => 5
|
20
21
|
|
21
22
|
include Fluent::SetTagKeyMixin
|
22
23
|
config_set_default :include_tag_key, false
|
@@ -39,7 +40,10 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
39
40
|
transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new({ hosts: get_hosts,
|
40
41
|
options: {
|
41
42
|
reload_connections: true,
|
42
|
-
retry_on_failure: 5
|
43
|
+
retry_on_failure: 5,
|
44
|
+
transport_options: {
|
45
|
+
request: { timeout: @request_timeout }
|
46
|
+
}
|
43
47
|
}}, &adapter_conf)
|
44
48
|
Elasticsearch::Client.new transport: transport
|
45
49
|
end
|
@@ -67,6 +71,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
67
71
|
bulk_message = []
|
68
72
|
|
69
73
|
chunk.msgpack_each do |tag, time, record|
|
74
|
+
next unless record.is_a? Hash
|
70
75
|
if @logstash_format
|
71
76
|
record.merge!({"@timestamp" => Time.at(time).to_datetime.to_s}) unless record.has_key?("@timestamp")
|
72
77
|
if @utc_index
|
metadata
CHANGED
@@ -1,8 +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
|
-
prerelease:
|
4
|
+
version: 0.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- diogo
|
@@ -10,86 +9,76 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2014-
|
12
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: fluentd
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- - ~>
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: patron
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- - ~>
|
32
|
+
- - "~>"
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: '0'
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- - ~>
|
39
|
+
- - "~>"
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: '0'
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: elasticsearch
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- - ~>
|
46
|
+
- - "~>"
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- - ~>
|
53
|
+
- - "~>"
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: rake
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- - ~>
|
60
|
+
- - "~>"
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '0'
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- - ~>
|
67
|
+
- - "~>"
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '0'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: webmock
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- - ~>
|
74
|
+
- - "~>"
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: '1'
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- - ~>
|
81
|
+
- - "~>"
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: '1'
|
95
84
|
description: ElasticSearch output plugin for Fluent event collector
|
@@ -99,8 +88,8 @@ executables: []
|
|
99
88
|
extensions: []
|
100
89
|
extra_rdoc_files: []
|
101
90
|
files:
|
102
|
-
- .gitignore
|
103
|
-
- .travis.yml
|
91
|
+
- ".gitignore"
|
92
|
+
- ".travis.yml"
|
104
93
|
- Gemfile
|
105
94
|
- History.md
|
106
95
|
- LICENSE.txt
|
@@ -113,27 +102,26 @@ files:
|
|
113
102
|
homepage: https://github.com/uken/fluent-plugin-elasticsearch
|
114
103
|
licenses:
|
115
104
|
- MIT
|
105
|
+
metadata: {}
|
116
106
|
post_install_message:
|
117
107
|
rdoc_options: []
|
118
108
|
require_paths:
|
119
109
|
- lib
|
120
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
111
|
requirements:
|
123
|
-
- -
|
112
|
+
- - ">="
|
124
113
|
- !ruby/object:Gem::Version
|
125
114
|
version: '0'
|
126
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
116
|
requirements:
|
129
|
-
- -
|
117
|
+
- - ">="
|
130
118
|
- !ruby/object:Gem::Version
|
131
119
|
version: '0'
|
132
120
|
requirements: []
|
133
121
|
rubyforge_project:
|
134
|
-
rubygems_version:
|
122
|
+
rubygems_version: 2.2.0
|
135
123
|
signing_key:
|
136
|
-
specification_version:
|
124
|
+
specification_version: 4
|
137
125
|
summary: ElasticSearch output plugin for Fluent event collector
|
138
126
|
test_files:
|
139
127
|
- test/helper.rb
|