Sha256: 4e59f41dc10ca498233dd05c0a5854d4eed06d3ff4df0dc94c097ad689772aa1
Contents?: true
Size: 622 Bytes
Versions: 31
Compression:
Stored size: 622 Bytes
Contents
require 'kurchatov/riemann/client' name 'riemann responder' always_start true ignore_errors true default[:hosts] = Kurchatov::Config[:riemann_responder] helpers do def flush @events_to_send ||= events.to_flush unless @events_to_send.empty? @riemanns.each { |riemann| riemann << @events_to_send } Log.debug("Sended events: #{@events_to_send}") end @events_to_send = nil end end run do @riemanns = [] plugin.hosts.each do |host| riemann, port = host.split(':') @riemanns << Kurchatov::Riemann::Client.new(:host => riemann, :port => port) end loop { flush; sleep 0.5 } end
Version data entries
31 entries across 31 versions & 1 rubygems