Page 2 of 2
Re: Command return OK when check but Unkonwn on nagios
Posted: Tue Nov 12, 2013 10:52 am
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.
Re: Command return OK when check but Unkonwn on nagios
Posted: Wed Nov 13, 2013 2:15 am
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 !
Re: Command return OK when check but Unkonwn on nagios
Posted: Wed Nov 13, 2013 12:22 pm
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)