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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 772deca02038a2f899139be565322d168b3b199b
4
- data.tar.gz: 9ecf9b2b47b1bfcbe4ceae8aa25b9d07b5c765a1
3
+ metadata.gz: f28159f4df9a0dcd8bc2b5a251c79de65043c712
4
+ data.tar.gz: b00867fac86c357dcca3e121f0ef60f05056e9ca
5
5
  SHA512:
6
- metadata.gz: 860093327616cabe40be6f9a6bdd8236c2fc4b29f0f6891d68339714fb74b5b535de5eede2a8cae357c0be963cf435e502d16052f5f0460dbbbac839f372b621
7
- data.tar.gz: e88c43227e32d4b80cd93fee3bd0179149c1236e1739b194aebe88afa864e9e61e41cded15f1b87b6b952305d3c6235ce0bd08ba0f9f97c56bfecf312324a8e5
6
+ metadata.gz: bb92e0313c36dc368bb1fe23cd916810e342f51710cdde87d173cacb9a904fc7f630c3fc988ab75be09007669a7e664c16a47a904d491ed412f5234c0fa71729
7
+ data.tar.gz: 31cf9bc62f0b9351a8c08c5d912f927193b044da10501ccd52615af3a5333686b079ae01fa742dc8db78d8ee88d09ee940280fbd5f349c028c546e2085c2c0cb
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
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 `${name}` placeholders.
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"
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
- begin
229
- http = http_connection(host, port)
230
- http.start do |http|
231
- requests.each do |req|
232
- res = http.request(req)
233
- unless res and res.is_a?(Net::HTTPSuccess)
234
- $log.warn "failed to post to growthforecast: #{host}:#{port}#{req.path}, post_data: #{req.body} code: #{res && res.code}"
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
- rescue IOError, EOFError, SystemCallError
239
- $log.warn "net/http keepalive POST raises exception: #{$!.class}, '#{$!.message}'"
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.5
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-09-03 00:00:00.000000000 Z
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