Downloading the check_jmx plugin
- Change the directory to your home directory:
cd ~
- Download the check_jmx plugin:
wget -O check_jmx.tgz "https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1274&cf_id=24"
- Extract the downloaded plugin:
tar xvf check_jmx.tgz
- Move the plugin to /usr/local/nagios/libexec/ directory:
sudo mv check_jmx /usr/local/nagios/libexec/
- Update the file /usr/local/nagios/libexec/check_jmx/nagios/plugin/check_jmx to enclose the $@ with double quotation marks:
"$@"
Thus the whole java line will become:
java -cp $RDIR/jmxquery.jar org.nagios.JMXQuery "$@"
The use of the double quote is to handle space character properly
Displaying the Help
/usr/local/nagios/libexec/check_jmx/nagios/plugin/check_jmx -help
Leave a Reply