check ActiveMQ Queuelength in persistent Queues
This is a checker which need to be run on your ActiveMQ-Host for persistent Queue length.
It is written in Bash and uses activemq’s commandline-interface ‚activemq-admin bstat‘ to gather information. It is called via nrpe. Please also read the sourcecode before using (maybe you have to edit the path to your init-Skript).
You need to edit your /etc/sudoers file and nrpe-config to deliver information to your nagios server.
Also it shall be able to check nonpersistent queues but somehow it is not yet.
This means: right now it only checks persistent queues.
It will be fixed in the future but for me monitoring nonpersistent queues is not a must-have.
Alternate Activemq-Checkers (I haven’t tested yet) are these ones:
Update (Aug 2013): After a while seeing my scripts in action I am thinking of a redesign. I have been told that putting „sleep“ into a script for monitoring-script is not a fine way of programming because latency for the whole monitoring system arises. The proper way would be shorter check-periods and a variable which is written during runtime and persists after script is terminated.
ecexute program every n seconds (n < 60):
if $OldQueueSize < $QueueSize ALERT elif $OldQueueSize >= $QueueSize
$OldQueueSize = $QueueSize