fluent-plugin-growthforecast 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/README.md +1 -1
- data/fluent-plugin-growthforecast.gemspec +1 -1
- data/lib/fluent/plugin/out_growthforecast.rb +24 -10
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f28159f4df9a0dcd8bc2b5a251c79de65043c712
|
4
|
+
data.tar.gz: b00867fac86c357dcca3e121f0ef60f05056e9ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb92e0313c36dc368bb1fe23cd916810e342f51710cdde87d173cacb9a904fc7f630c3fc988ab75be09007669a7e664c16a47a904d491ed412f5234c0fa71729
|
7
|
+
data.tar.gz: 31cf9bc62f0b9351a8c08c5d912f927193b044da10501ccd52615af3a5333686b079ae01fa742dc8db78d8ee88d09ee940280fbd5f349c028c546e2085c2c0cb
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -58,7 +58,7 @@ If you want to use tags for `section` or `service` in GrowthForecast, use `tag_
|
|
58
58
|
|
59
59
|
This configuration matches only with metrics.field1, metrics.key20, .... and doesn't match with metrics.field or metrics.foo.
|
60
60
|
|
61
|
-
If you want to customise for more flexible graph path, use `graph_path` option with `${tag}` and `${
|
61
|
+
If you want to customise for more flexible graph path, use `graph_path` option with `${tag}` and `${key_name}` placeholders.
|
62
62
|
|
63
63
|
<match test.service1>
|
64
64
|
type growthforecast
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-growthforecast"
|
5
|
-
gem.version = "0.2.
|
5
|
+
gem.version = "0.2.6"
|
6
6
|
gem.authors = ["TAGOMORI Satoshi"]
|
7
7
|
gem.email = ["tagomoris@gmail.com"]
|
8
8
|
gem.summary = %q{Fluentd output plugin to post numbers to GrowthForecast (by kazeburo)}
|
@@ -225,18 +225,32 @@ class Fluent::GrowthForecastOutput < Fluent::Output
|
|
225
225
|
host,port = connect_to(events.first[:tag], events.first[:name])
|
226
226
|
|
227
227
|
requests = events.map{|e| post_request(e[:tag], e[:name], e[:value])}
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
end
|
228
|
+
|
229
|
+
http = nil
|
230
|
+
requests.each do |req|
|
231
|
+
begin
|
232
|
+
unless http
|
233
|
+
http = http_connection(host, port)
|
234
|
+
http.start
|
236
235
|
end
|
236
|
+
res = http.request(req)
|
237
|
+
unless res and res.is_a?(Net::HTTPSuccess)
|
238
|
+
$log.warn "failed to post to growthforecast: #{host}:#{port}#{req.path}, post_data: #{req.body} code: #{res && res.code}"
|
239
|
+
end
|
240
|
+
rescue IOError, EOFError, Errno::ECONNRESET, Errno::ETIMEDOUT, SystemCallError
|
241
|
+
$log.warn "net/http keepalive POST raises exception: #{$!.class}, '#{$!.message}'"
|
242
|
+
begin
|
243
|
+
http.finish
|
244
|
+
rescue => e
|
245
|
+
# ignore all errors for connection with error
|
246
|
+
end
|
247
|
+
http = nil
|
237
248
|
end
|
238
|
-
|
239
|
-
|
249
|
+
end
|
250
|
+
begin
|
251
|
+
http.finish
|
252
|
+
rescue => e
|
253
|
+
# ignore
|
240
254
|
end
|
241
255
|
end
|
242
256
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-growthforecast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- .document
|
77
77
|
- .gitignore
|
78
|
+
- .travis.yml
|
78
79
|
- AUTHORS
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|