-
1. Re: HornetQ monitoring with Nagios & Cacti
clebert.suconic Nov 23, 2010 11:54 AM (in response to ddahlke)Maybe someone from the community? I'm not aware of anyone.
Maybe you could be the first and share anything around it.
-
2. Re: HornetQ monitoring with Nagios & Cacti
ebeebe Feb 17, 2011 12:14 PM (in response to ddahlke)Hi Drew;
I haven't created any Cacti templates yet, but have created some JMX monitors within Nagios. Using check_jmx works great; Here's an example to measure an alert on number of messages:
/usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://SOMEHOST:SOMEPORT/jmxrmi -O org.hornetq:module=JMS,name=\"my_topic_name\",type=Topic -A DurableMessageCount -vvvv -w 100 -c 200
That's all there is to it. To simplify monitoring a bunch of different objects, I made a simple wrapper script:
[root@nagios libexec]# cat check_jmx_bean.sh
#!/bin/bash
HOST=$1
PORT=$2
OBJECT=$3
ATTRIBUTE=$4
WARN=$5
CRIT=$6
/usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://$HOST:$PORT/jmxrmi -O "$OBJECT" -A $ATTRIBUTE -vvvv -w $WARN -c $CRIT
.. and then add it to checkcommands.cfg like this:
# check_jms command
define command{
command_name check_jmx_bean
command_line $USER1$/check_jmx_bean.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
}
.. and finally monitor like this:
define service{
use generic-service ; Name of service template to use
host_name my-hornet-server
service_description my-hornet-server HornetQ instance
check_command check_jmx_bean!PORT!org.hornetq:module=JMS,name=\\"my_topic_name\\",type=Topic!DurableMessageCount!1000!5000
contact_groups admins
}
Sorry if it's a little sloppy - I just made it about 10 minutes ago. Hopefully this will help though.
Cheers!
Erik
-
3. Re: HornetQ monitoring with Nagios & Cacti
ebeebe Feb 17, 2011 12:18 PM (in response to ddahlke)As another aside.. an easy way to browse the jmx objects to monitor is to use jmxterm. (You can google it and download - it's a single jar file).
Run it like this:
# java -jar jmxterm-1.0-alpha-4-uber.jar -l HOST:PORT
.. you'll get a prompt, and can do stuff like this:
$> beans
#domain = org.hornetq:
org.hornetq:address="jms.queue.DLQ",module=Core,name="jms.queue.DLQ",type=Queue
org.hornetq:address="jms.queue.ExampleQueue",module=Core,name="jms.queue.ExampleQueue",type=Queue
org.hornetq:address="jms.queue.ExpiryQueue",module=Core,name="jms.queue.ExpiryQueue",type=Queue
.. etc. It's cool. If you haven't already configured jmxremote for your JVM, that's obviously required - the instructions are in the HornetQ docs, and it's quick to set up.
Good luck,
Erik
-
4. HornetQ monitoring with Nagios & Cacti
reid Feb 25, 2011 8:19 PM (in response to ebeebe)We used to use Nagios and Cacti until we moved to a much more comprehensive and easier to use enterprise monitoring solution called Hyperic HQ. It is supported by VMWare. They have an open source, free, version that we are running to monitoring everything from Linux to HornetQ.
Checkout Hyperic HQ Community Edition: http://www.hyperic.com/
Then add the HornetQ monitoring plug-in: https://github.com/ClarityServices/hyperic-hornetq