bin/riemann-babbler in riemann-babbler-0.5.9 vs bin/riemann-babbler in riemann-babbler-0.6.0

- old
+ new

@@ -77,15 +77,23 @@ configatron.plugins.files.each do |file| plugins << file end end +# set riemann client +riemann_ip = Resolv.new.getaddress(configatron.riemann.host) +riemann = Riemann::Client.new( + :host => riemann_ip, + :port => configatron.riemann.port +) +riemann = ( configatron.riemann.proto == 'tcp' ) ? riemann.tcp : riemann + # start plugins plugins.each { |plugin| require plugin } plugin_threads = Riemann::Babbler.registered_plugins.map do |plugin| Thread.new { - plugin.new( configatron, logger ).run + plugin.new( configatron, logger, riemann ).run } end Signal.trap "TERM" do # перехватываем сообщение (на будущее) plugin_threads.each( &:kill )