"UNKNOWN" problem, with a return code of 0 in solaris 9.

Marc Powell marc at ena.com
Thu Dec 11 19:15:59 CET 2003



________________________________________
From: Patrick Walentiny [mailto:Patrick.Walentiny at stellent.com] 
Sent: Thursday, December 11, 2003 10:38 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] "UNKNOWN" problem, with a return code of 0 in
solaris 9.

I looked through a lot of the mail list archives and didn't see this
problem listed by anyone else.  It's a bit long winded but I figure
being verbose is better than not being verbose enough.  So here goes.
	We are using nagios to monitor multiple UNIX systems, including
Solaris 2.6 8 & 9.  Our method for doing so is public keys saved in the
"authorized_keys" file of each nagios client's home directory etc...
When our server runs the "check_by_ssh" against solaris 9 clients, the
nagios server claims it is getting a status of "UNKNOWN".  I dug in to
the documentation to find out that this is figured out via return codes,
IE 0,1,2,3 etc...  So I ran check_by_ssh against the system in question
to see for myself what the problem was.  I am only able to get return
codes of 0 "OK".  I'll show the syntax I used below.  I can get it to
also give return codes of 1 and 2 if I intentionally invoke a warning or
critical condition, but when it is run from the nagios process itself it
shows up as "UNKNOWN", and occasionally flaps to okay for brief periods
of time, even though the status output shows the disks are perfectly
okay.
	Here is my output from my tests....


[...]

$ /usr/lib/nagios/plugins/check_by_ssh -H 12.40.185.175  -C
'/opt/nagios/libexec/check_disk -c 10% -w 20%'
$ echo $?
0
$

<MARC>
It appears that the plugin isn't being executed on the remote host.
Check_by_ssh should return the output of the check_disk command to the
command line:

bash-2.05a$ ./check_by_ssh -H <host removed> -C
'/usr/local/nagios/libexec/check_disk -c 10% -w 20%'
DISK OK - [3434680 kB (47%) free on /dev/ida/c0d0p3] [107450 kB (89%)
free on /dev/ida/c0d0p1] [257216 kB (100%) free on none]

Is the plugin (check_disk) executable by the user that you are ssh'ing
as and in the location specified? How about /bin/df (at least that's
what it uses under linux)? It needs to be executable by the nagios user
as well.

--
Marc 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list