This is what I got when putting single quotes to '$ARG3':
I've tried the same way with the other ARG but I'm getting the same output.
I think the problem is around here, this is the check_jmx.sh file located in /usr/local/nagios/libexec
Code: Select all
#!/bin/sh
#
# Nagios JMX plugin.
#
JAVA_CMD=`which java`
if [ -z $JAVA_CMD ]
then
if [ -x $JAVA_HOME/bin/java ]
then
JAVA_CMD=$JAVA_HOME/bin/java
else
echo JMX CRITICAL - java not found.
exit 2
fi
fi
DIR=`dirname $0`
$JAVA_CMD -jar $DIR/check_jmx.jar "$@"
Code: Select all
JMX CRITICAL - java not found.