I’ve recently written two new check-scripts for ActiveMQ. These nagios scripts will keep an eye out on ActiveMQ’s internal storage space and status of the queues.
Both scripts make use of activemq’s administrative web-interface (located at hostname:port/admin/ by default).
check_activemq_mem url warn crit
The url to use is the ‘print’ version, as that’s a lot simpler to parse. It can be found on
check_activemq_mem http://hostname:port/admin/index.jsp?printable=true 5 10
WARNING: ActiveMQ memory usage: 7/0/0 (store/memory/temp)
The url to use is
The configuration is done in the check_script itself. At the top there is a configuration block (perl hash) that looks like this:
my %config = ( "ActiveMQ.DLQ" => [ "* * * * *", "0" ], "sig-io.startJob" => [ "40-59 20 * * *", 5000, "0-15 21 * * *", 5000, "* * * * *", 100 ], "sig-io.finishJob" => [ "0-45 21 * * *", 5000, "* * * * *", 100 ], "default" => [ "* * * * *", "10" ], );
In this config block, you can specify a number of crontab(5) like rules, all with a limit behind them. This limit will be checked against the number of items in the named queue, during the specified time-periods. If no rule is found that matches the current timeslot or matches the current Queue-name, the ‘default’ values will be used.
You can specify a limit value of 0 or a positive integer as a maximum amount of queue-items in the named queue. When this limit is passed, the script will go into warning or error state.
Specifying a limit of -1 signifies that this queue is to be completely ignored.
OK: ActiveMQ: Everything reported OK (url)