riemann-babbler 0.9.9.1 → 0.9.9.2

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.
Files changed (3) hide show
  1. data/lib/riemann/version.rb +1 -1
  2. data/lib/start.rb +3 -7
  3. metadata +2 -2
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '0.9.9.1'
3
+ VERSION = '0.9.9.2'
4
4
  end
5
5
  end
data/lib/start.rb CHANGED
@@ -9,7 +9,6 @@ class Riemann::Babbler::Starter
9
9
 
10
10
  attr_reader :logger
11
11
  attr_reader :opts
12
- attr_reader :riemann
13
12
  attr_reader :config
14
13
 
15
14
  def initialize(opts, configatron)
@@ -27,6 +26,7 @@ class Riemann::Babbler::Starter
27
26
  merge_config
28
27
  set_logger_lvl
29
28
  load_plugins
29
+ $riemann = get_riemann
30
30
  start_plugins!
31
31
  end
32
32
 
@@ -112,10 +112,6 @@ class Riemann::Babbler::Starter
112
112
  eval(cmd)
113
113
  end
114
114
 
115
- def riemann
116
- @riemann ||= get_riemann
117
- end
118
-
119
115
  def get_riemann
120
116
  begin
121
117
  riemann_ip = Resolv.new.getaddress(config.riemann.host)
@@ -126,7 +122,7 @@ class Riemann::Babbler::Starter
126
122
  riemann = ( config.riemann.proto == 'tcp' ) ? riemann.tcp : riemann
127
123
  riemann.connect
128
124
  rescue
129
- logger.fatal "Can't resolv riemann host: #{config.riemann.host}"
125
+ logger.fatal "Can't resolv or connect to riemann host: #{config.riemann.host}"
130
126
  sleep 5
131
127
  retry
132
128
  end
@@ -144,7 +140,7 @@ class Riemann::Babbler::Starter
144
140
  def start_plugins!
145
141
  plugin_threads = started_plugins.map do |plugin|
146
142
  Thread.new {
147
- plugin.new( config, logger, riemann ).run
143
+ plugin.new( config, logger, $riemann ).run
148
144
  }
149
145
  end
150
146
 
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.9.9.1
4
+ version: 0.9.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -194,7 +194,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  segments:
196
196
  - 0
197
- hash: -1214974118746484053
197
+ hash: 2251556162685652986
198
198
  required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  none: false
200
200
  requirements: