[Nagiosplug-help] Nagios reports all check_by_ssh returns as UNKNOWN?

Steve Gilbert SGilbert at nvidia.com
Wed Dec 7 16:52:03 CET 2005


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 am trying to 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.

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.  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.

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.  For the time
being, I'm just running an SNMP client to get this info into Nagios, but
I'd really rather use check_by_ssh if at all possible.

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

Here's the exact command I'm using on the command line.  This same thing
is configutred in my .cfg file.

check_by_ssh -H 192.168.230.112 -C
'/home/utils/nagios/libexec/check_disk -w 10% -c 5% -p /var'

Thanks!




More information about the Help mailing list