Command return OK when check but Unkonwn on nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Command return OK when check but Unkonwn on nagios

Post by slansing »

It looks like this is an expected return:

Code: Select all

echo "UNKNOWN - $RESULT proc found ."
exit $STATE_UNKNOWN
What was the output when you ran it as nagios, I'd change the group perms on the perm file to Apache as nagios should be a part of the Apache group and this would remove the possibility of it being a web permissions issue? I'd also recommend changing your exits to not say "proc found" if it does not actually find the proc.
amitdaniel
Posts: 25
Joined: Mon Jul 01, 2013 9:17 am

Re: Command return OK when check but Unkonwn on nagios

Post by amitdaniel »

the output when i ran it with nagios user is OK : proc found.
but still in the UI it's unknown.

maybe i can see some logs how nagios send the command ?

Please help me to solve this issue.

thanks !
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Command return OK when check but Unkonwn on nagios

Post by sreinhardt »

You likely need to change the $HOSTADDRESS$ to match your root@ portion from when you ran it as the nagios user. If you are just using the hostname or IP, it doesn't know what user to attempt to login as. (./check_logstash.sh -H root@openx-dist1d -p /usr/local/nagios/x.pem)
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked