Sha256: 6c46b42ef3bba21aaa076da823bfd006743c4b0308d050867d6fb4010a51c6fd

Contents?: true

Size: 515 Bytes

Versions: 51

Compression:

Stored size: 515 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

51 entries across 51 versions & 1 rubygems

Version Path
kurchatov-0.2.5 examples/rabbitmq.rb
kurchatov-0.2.4 examples/rabbitmq.rb
kurchatov-0.2.3 examples/rabbitmq.rb
kurchatov-0.2.2 examples/rabbitmq.rb
kurchatov-0.2.1 examples/rabbitmq.rb
kurchatov-0.2.0 examples/rabbitmq.rb
kurchatov-0.1.8 examples/rabbitmq.rb
kurchatov-0.1.7 examples/rabbitmq.rb
kurchatov-0.1.6 examples/rabbitmq.rb
kurchatov-0.1.5 examples/rabbitmq.rb
kurchatov-0.1.4 examples/rabbitmq.rb
kurchatov-0.1.3 examples/rabbitmq.rb
kurchatov-0.1.2 examples/rabbitmq.rb
kurchatov-0.1.1 examples/rabbitmq.rb
kurchatov-0.1.0 examples/rabbitmq.rb
kurchatov-0.0.9 examples/rabbitmq.rb
kurchatov-0.0.8.pre.3 examples/rabbitmq.rb
kurchatov-0.0.7.pre.4 examples/rabbitmq.rb
kurchatov-0.0.8.pre.2 examples/rabbitmq.rb
kurchatov-0.0.8.pre.1 examples/rabbitmq.rb