check_activemq_queue.sh

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.

You can download it at nagios exchange here or locally here: check_activemq_queues.sh

Alternate Activemq-Checkers (I haven’t tested yet) are these ones:

http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/ActiveMQ_QueueMonitor/details

http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/ActiveMQ_Watch/details

http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_activemq/details

 

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.

Something like
$OldQueueSize=0;
ecexute program every n seconds (n < 60):
$QueueSize=checkNewQueuesize();
if $OldQueueSize < $QueueSize ALERT elif $OldQueueSize >= $QueueSize
OK
else
UNKNOWN
fi
$OldQueueSize = $QueueSize

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *


neun − = 1

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>