[Nagiosplug-help] Nagios report state UNKOWN when OK
stridfeldt at gmail.com
Fri Feb 13 11:09:40 CET 2009
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 $?
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
 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
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help