Sha256: 8b4f5bb294227d0626ac68dad435b6c5e8bbcde00ed05b1bd36096038a49814c

Contents?: true

Size: 507 Bytes

Versions: 14

Compression:

Stored size: 507 Bytes

Contents

default[:api_url] = 'http://admin:admin@127.0.0.1:55672/api'
default[:vhost] = ['notexists']

collect do
  plugin.vhosts.each do |vhost|
    vhost_uri = "#{plugin.api_url}/queues/#{CGI.escape(vhost)}"
    JSON.parse(rest_get(vhost_uri)).each do |queue|
      event(
        :service => "rabbitmq queue #{queue['name'].gsub('.', '_')} messages count",
        :metric => queue['messages'].to_i,
        :desc => "Rabbitmq queue count in #{queue['name']}",
        :critical => 1000
      )
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kurchatov-0.0.5.pre5 examples/rabbitmq.rb
kurchatov-0.0.5.pre4 examples/rabbitmq.rb
kurchatov-0.0.5.pre2 examples/rabbitmq.rb
kurchatov-0.0.5.pre1 examples/rabbitmq.rb
kurchatov-0.0.4 examples/rabbitmq.rb
kurchatov-0.0.4d examples/rabbitmq.rb
kurchatov-0.0.4c examples/rabbitmq.rb
kurchatov-0.0.4b examples/rabbitmq.rb
kurchatov-0.0.3 examples/rabbitmq.rb
kurchatov-0.0.3b examples/rabbitmq.rb
kurchatov-0.0.3a examples/rabbitmq.rb
kurchatov-0.0.2 examples/rabbitmq.rb
kurchatov-0.0.2b examples/rabbitmq.rb
kurchatov-0.0.1 examples/rabbitmq.rb