Downloading the check_jmx plugin

  1. Change the directory to your home directory:
    cd ~
  2. 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"
  3. Extract the downloaded plugin:
    tar xvf check_jmx.tgz
  4. Move the plugin to /usr/local/nagios/libexec/ directory:
    sudo mv check_jmx /usr/local/nagios/libexec/
  5. 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