JMX plugin
Ryan Gravener
ryangravener at gmail.com
Mon Feb 25 23:23:08 CET 2008
I have modified this plugin:
http://www.nagiosexchange.org/Misc.54.0.html?&tx_netnagext_pi1%5Bp_view%5D=808
a little bit. Added authentication and changed the output format.
The plugin executes from the command line fine, but on the nagios server I get:
Heap UNKNOWN 02-25-2008 22:08:22 0d 2h 12m 8s 4/4 NRPE: Unable to
read output
on the machine I execute the command described in nrpe.cfg
command[check_heap]=/usr/lib/nagios/plugins/check_jmx -U
service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi -O
java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J
used -vvvv -w 731847066 -c 1045495808 -username joe -password doe
which outputs:
JMX OK - HeapMemoryUsage.used is
78707376,committed=1063321600;init=1073741824;max=1063321600;used=78707376
I think the output is legal, and my settings are ok. But perhaps the
command arguments are not passing correctly since a shell script is
calling the java jar:
#!/bin/sh
#
# Nagios plugin to monitor Java JMX (http://java.sun.com/jmx)attributes.
#
RDIR=`dirname $0`
java -cp $RDIR/jmxquery.jar jmxquery.JMXQuery $@
Thanks,
--
Ryan Gravener
http://ryangravener.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list