[Nagiosplug-help] Nagios report state UNKOWN when OK

Fredrik Stridfeldt stridfeldt at gmail.com
Fri Feb 13 11:09:40 CET 2009


Hi!

This is a problem that I've been having for quite some time. Searching
the archives turns up a few other people reporting the same problem, but
I can't find a solution.

I use check_by_ssh to run the check_disk plugin on a few
remote systems. When I run this from the command line, it always does
the right thing. It returns the correct string and return code (checked
with 'echo $?'). It works flawlessly.

*/usr/local/groundwork/nagios/libexec/check_by_ssh -H 10.194.145.142 -t 60
-l "nagios" -C "libexec/check_disk -w 400 -c 200 -p /"
DISK OK - free space: / 14049 MB (82%);| /=3099MB;16747;16947;0;17147
-bash-3.2$ echo $?
0
-bash-3.2$*

However, when this is set up to run through Nagios, it usually reports
the check in the UNKNOWN state...even though it still gives the correct
"OK..." string.
*
[1234518396] SERVICE NOTIFICATION:
fredriks;absaus0180;ssh_disk_root;UNKNOWN;service-notify-by-email;DISK OK -
free space: / 1
4049 MB (82%):*

Occasionally, Nagios will change it to OK or WARNING or
whatever is correct at the time, but for a good 90% of the time, it just
sits there in UNKNOWN. It doesn't seem to matter if the target machine
is Linux or Solaris, nor can I find any pattern to when and where it
happens. Again, it *always* works perfectly when run from the command
line.
Worth to notice, i run this service check on simular systems with same
arguments, and no problems what so ever.

I've played with giving check_by_ssh a hostname instead of an IP
address. I've tried it both with '-l nagios' and without (it's always
run from nagios account). I've also tried the -f flag (the purpose of
which I don't really understand). Nothing seems to help.

Has anyone else seen this problem and/or found the cause of it?


Thanks!
/Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20090213/1e6af4d4/attachment.html>


More information about the Help mailing list