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.
<users>
<authenticationUser username="nagios" password="NAGIOSpass" groups="nagios,everyone"/>
</users>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<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" />
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
<transportConnectors>
<transportConnector name="stomp" uri="stomp://127.0.0.1:61613"/>
</transportConnectors>
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.