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

Version Path
kurchatov-0.3.8 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.7 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.6 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.5 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.4 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.3 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.2 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.1 lib/kurchatov/responders/riemann.rb
kurchatov-0.3.0 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.9 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.8 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.7 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.6 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.5 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.4 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.3 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.2 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.1 lib/kurchatov/responders/riemann.rb
kurchatov-0.2.0 lib/kurchatov/responders/riemann.rb
kurchatov-0.1.8 lib/kurchatov/responders/riemann.rb