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

Marc Powell marc at ena.com
Thu Dec 11 23:21:02 CET 2003


Unfortunately I'm not going to be much more help as I'm not too familiar
with the internal functioning of the plugin but the output you're seeing
looks odd to me, particularly the ";| /=10943MB;9606;10807;0;12008
/usr=6814MB;6452;7258;0;8065 /var=7875MB;6452;7258;0;8065
var/run=7437MB;5949;6693;0;7437 /tmp=7437MB;6028;6781;0;7535
/u01=426986MB;390857;439714;0;488572". I don't believe that's supposed
to be in there and it may be a result of df providing output in a format
that the plugin doesn't fully understand. It may also just be an
artifact of running check_disk under solaris and perfectly normal.

--
marc

> -----Original Message-----
> From: Patrick Walentiny [mailto:Patrick.Walentiny at stellent.com]
> Sent: Thursday, December 11, 2003 4:06 PM
> To: Marc Powell; nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] "UNKNOWN" problem, with a return code of 0
in
> solaris 9.
> 
> I'm sorry I didn't include the output, it is in fact executing.  Let
me
> paste the output for you.
> 
> 
> /***********************************/
> $ /usr/lib/nagios/plugins/check_by_ssh -v -H 12.40.185.175 -C
> '/opt/nagios/libexec/check_disk -c 10% -w 20%'
> /usr/bin/ssh 12.40.185.175 '/opt/nagios/libexec/check_disk -c 10% -w
> 20%'
> DISK OK - free space: / 10944 MB (91%); /usr 6814 MB (84%); /var 7875
MB
> (98%); /var/run 7438 MB (100%); /tmp 7438 MB (99%); /u01 426987 MB
> (87%);| /=10943MB;9606;10807;0;12008 /usr=6814MB;6452;7258;0;8065
> /var=7875MB;6452;7258;0;8065 /var/run=7437MB;5949;6693;0;7437
> /tmp=7437MB;6028;6781;0;7535 /u01=426986MB;390857;439714;0;488572
> 
> /************************************/
> 
> It's funny, no matter what the circumstance the remote plugin always
> claims it is okay.  The return code (either from the remote plugin, or
> the local check_by_ssh plugin is returning a 3, but ONLY if nagios
> itself runs it.
> 
> 
> -----Original Message-----
> From: Marc Powell [mailto:marc at ena.com]
> Sent: Thursday, December 11, 2003 12:16 PM
> To: Patrick Walentiny; nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] "UNKNOWN" problem, with a return code of 0
> in solaris 9.
> 
> 
> 
> ________________________________________
> 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