Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

dhambali

Reviews(1)
The current check_jmx shell script won't return information to the performance gathering subsystem in Nagios. Add-ons like PNP4nagios aren't able to pick up the returned values without the proper output.

I offer this little hack...


RDIR=`dirname $0`
OUTPUT=`java -cp $RDIR/jmxquery.jar org.nagios.JMXQuery $@`
EXIT_STATUS=$?
STATUS=`echo $OUTPUT`
VALUE=`echo $OUTPUT | awk '{print $NF}'`
echo "$STATUS | $VALUE"

exit $EXIT_STATUS