Ask Your Question

How do I monitor Activemq and its queues for MCollective?

asked 2013-07-22 13:42:55 -0500

ramindk gravatar image

updated 2013-07-22 13:47:12 -0500

I've recently installed Activemq and Mcollective. How can I monitor the health of Activemq and that messages are being passed?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-22 13:43:08 -0500

ramindk gravatar image

updated 2015-04-21 17:47:10 -0500

I'm using ripienaar's scripts to monitor Activemq.

checkactivemq attempts to write to a queue/topic of it's own and then read the message back out. checkactivemq_queue should read the standard node queue to check the number of messages.

I made these additions to the activemq.xml to allow monitoring to have access. There will be other settings within each part of the activemq.xml config file. My settings assume you have a nagios user you'd like to give access and the queue/topic destination is nagios.topic or at least nagios. something. Additionally the scripts don't support SSL so I opened an uncrypted local port for them to interact with.

  <authenticationUser username="nagios" password="NAGIOSpass" groups="nagios,everyone"/>

        <authorizationEntry topic="nagios.>" write="nagios" read="nagios" admin="nagios" />
        <authorizationEntry queue="nagios.>" write="nagios" read="nagios" admin="nagios" />
        <authorizationEntry topic="ActiveMQ.>" write="nagios" read="nagios" admin="nagios" />
        <authorizationEntry queue="ActiveMQ.>" write="nagios" read="nagios" admin="nagios" />

  <transportConnector name="stomp" uri="stomp://"/>

After restarting Activemq you should be able to use the checks as follows.

check_activemq.rb -h localhost --port 61613 --user nagios --password NAGIOSpass --destination /topic/nagios.monitor  -w 2 -c 5
check_activemq_queue.rb -h localhost --port 61613 --user nagios --password NAGIOSpass --queue mcollective.nodes  --queue_warn 100 --queue_crit 500 --memory_percent_warn 50 --memory_percent_crit 75

Using --queue mcollective.nodes assumes you're using direct addressing in your MCollective configs. I believe this is default in the most recent versions of the mcollective package and documentation.

Note: your check will fail unless mcollective has connected at least once to your current activemq process. I suspect the queue isn't created until there is a request.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-07-22 13:42:55 -0500

Seen: 876 times

Last updated: Apr 21 '15