Check works in command line, fails in Nagios XI
Posted: Thu Oct 18, 2018 11:22 am
I am running a check for a bitbucket java process via NCPA. The check finds the 1 running process when run from command line, but fails when running the same check in Nagios XI. We are running Nagios XI 5.4 on Red Hat 7 64bit.
HOSTNAME and TOKEN obscured for security.
returns 1 process found.
from the Nagios XI config, it is converting the into as I save the check configuration and returns 0 processes.
Oddly, when I test this from the service configuration screen, it seems to cut off the rest of the command after the ; in the command definition.
HOSTNAME and TOKEN obscured for security.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H HOSTNAME -t 'TOKEN' -P 5693 -M 'processes' -q 'name=java,cmd=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64//bin/java -classpath /opt/atlassian-bitbucket-latest/app -Datlassian.standalone=BITBUCKET -Dbitbucket.home=/bitbucket/bitbucket-home -Dbitbucket.install=/opt/atlassian-bitbucket-latest -Xms512m -Xmx1g -XX:+UseG1GC -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.io.tmpdir=/bitbucket/bitbucket-home/tmp -Djava.library.path=/opt/atlassian-bitbucket-latest/lib/native;/bitbucket/bitbucket-home/lib/native com.atlassian.bitbucket.internal.launcher.BitbucketServerLauncher start' -w 0: -c 1:1from the Nagios XI config, it is converting the
Code: Select all
latest/lib/native;/bitbucket/bitbucketCode: Select all
latest/lib/native%3B/bitbucket/bitbuckeOddly, when I test this from the service configuration screen, it seems to cut off the rest of the command after the ; in the command definition.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H HOSTNAME -t 'TOKEN' -P 5693 -M 'processes' -q 'name=java,cmd=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64//bin/java -classpath /opt/atlassian-bitbucket-latest/app -Datlassian.standalone=BITBUCKET -Dbitbucket.home=/bitbucket/bitbucket-home -Dbitbucket.install=/opt/atlassian-bitbucket-latest -Xms512m -Xmx1g -XX:+UseG1GC -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.io.tmpdir=/bitbucket/bitbucket-home/tmp -Djava.library.path=/opt/atlassian-bitbucket-latest/lib/native