riemann-babbler 0.6.7 → 0.6.8

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.
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '0.6.7'
3
+ VERSION = '0.6.8'
4
4
  end
5
5
  end
data/lib/start_helpers.rb CHANGED
@@ -59,13 +59,18 @@ def load_plugins(configatron)
59
59
  end
60
60
 
61
61
  def get_riemann(configatron)
62
- riemann_ip = Resolv.new.getaddress(configatron.riemann.host)
63
- riemann = Riemann::Client.new(
64
- :host => riemann_ip,
65
- :port => configatron.riemann.port
66
- )
67
- riemann = ( configatron.riemann.proto == 'tcp' ) ? riemann.tcp : riemann
68
- riemann
62
+ begin
63
+ riemann_ip = Resolv.new.getaddress(configatron.riemann.host)
64
+ riemann = Riemann::Client.new(
65
+ :host => riemann_ip,
66
+ :port => configatron.riemann.port
67
+ )
68
+ riemann = ( configatron.riemann.proto == 'tcp' ) ? riemann.tcp : riemann
69
+ rescue
70
+ logger.error "Can't resolv riemann host: #{configatron.riemann.host}"
71
+ sleep 5
72
+ end
73
+ riemann
69
74
  end
70
75
 
71
76
  # логика стартования плагинов
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-babbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: -4487158897732355456
168
+ hash: 2214461379031798296
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements: