<DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I have exactly the same problem with a host running SCO SV 5.0.4.</DIV>
<DIV>(Nagios server version 1.1)</DIV>
<DIV> </DIV>
<DIV>My checkcommand is:</DIV>
<DIV> </DIV>
<DIV>$USER1$/check_by_ssh -H $HOSTADDRESS$ -C "/u/nagios/check_log.sh $ARG1$ $ARG2$ $ARG3$" -t 20 -l nagios</DIV>
<DIV> </DIV>
<DIV>There is no ssh connection problem, and the check_log.sh plugin works fine (the plugin look for the pattern "WARNING" in /var/adm/messages).</DIV>
<DIV><BR>The check_log.sh is my shell version of the check_log plugin, there is no "exit" with return code of 3 in it.</DIV>
<DIV> </DIV>
<DIV>I have try to run this command from the command line on the nagios server, connected as user nagios, i never been able to return an unknown status.</DIV>
<DIV> </DIV>
<DIV>The execution always return the right answer "OK - Log check Ok - No pattern match found" (or Critical if the pattern is found) but nearly everytime with an unknown status (9/10).</DIV>
<DIV> </DIV>
<DIV>On the same host, another service have the same problem, but the UNKNOWN status comes only one or two times a day ...</DIV>
<DIV> </DIV>
<DIV>Is it possible that this return code comes from the check_by_ssh plugin ? (there's no additionnal information even with the verbose output, i have try to look in the source code but i'm far from a "C guru" ...).</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks.</DIV>
<DIV>Jpt.</DIV>
<DIV><BR><B><I>Patrick Walentiny <Patrick.Walentiny@stellent.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">/************************************/<BR><BR>It's funny, no matter what the circumstance the remote plugin always<BR>claims it is okay. The return code (either from the remote plugin, or<BR>the local check_by_ssh plugin is returning a 3, but ONLY if nagios<BR>itself runs it.<BR><BR><BR>-----Original Message-----<BR>From: Marc Powell [mailto:marc@ena.com] <BR>Sent: Thursday, December 11, 2003 12:16 PM<BR>To: Patrick Walentiny; nagios-users@lists.sourceforge.net<BR>Subject: RE: [Nagios-users] "UNKNOWN" problem, with a return code of 0<BR>in solaris 9.<BR><BR><BR><BR>________________________________________<BR>From: Patrick Walentiny [mailto:Patrick.Walentiny@stellent.com] <BR>Sent: Thursday, December 11, 2003 10:38 AM<BR>To: nagios-users@lists.sourceforge.net<BR>Subject: [Nagios-users] "UN
 KNOWN" problem, with a return code of 0 in<BR>solaris 9.<BR><BR>I looked through a lot of the mail
 list archives and didn't see this<BR>problem listed by anyone else. It's a bit long winded but I figure<BR>being verbose is better than not being verbose enough. So here goes.<BR>We are using nagios to monitor multiple UNIX systems, including<BR>Solaris 2.6 8 & 9. Our method for doing so is public keys saved in the<BR>"authorized_keys" file of each nagios client's home directory etc...<BR>When our server runs the "check_by_ssh" against solaris 9 clients, the<BR>nagios server claims it is getting a status of "UNKNOWN". I dug in to<BR>the documentation to find out that this is figured out via return codes,<BR>IE 0,1,2,3 etc... So I ran check_by_ssh against the system in question<BR>to see for myself what the problem was. I am only able to get return<BR>codes of 0 "OK". I'll show the syntax I used below. I can get it to<BR>also give return codes of 1 and 2 if I intentionally invoke a w
 arning or<BR>critical condition, but when it is run from the nagios process itself it<BR>shows up
 as "UNKNOWN", and occasionally flaps to okay for brief periods<BR>of time, even though the status output shows the disks are perfectly<BR>okay.<BR>Here is my output from my tests....<BR><BR><BR>[...]<BR><BR>$ /usr/lib/nagios/plugins/check_by_ssh -H 12.40.185.175 -C<BR>'/opt/nagios/libexec/check_disk -c 10% -w 20%'<BR>$ echo $?<BR>0<BR>$<BR><BR><MARC><BR>It appears that the plugin isn't being executed on the remote host.<BR>Check_by_ssh should return the output of the check_disk command to the<BR>command line:<BR><BR>bash-2.05a$ ./check_by_ssh -H <HOST removed>-C<BR>'/usr/local/nagios/libexec/check_disk -c 10% -w 20%'<BR>DISK OK - [3434680 kB (47%) free on /dev/ida/c0d0p3] [107450 kB (89%)<BR>free on /dev/ida/c0d0p1] [257216 kB (100%) free on none]<BR><BR>Is the plugin (check_disk) executable by the user that you are ssh'ing<BR>as and in the location specified? How about /bin/df (at leas
 t that's<BR>what it uses under linux)? It needs to be executable by the nagios user<BR>as
 well.<BR><BR>--<BR>Marc <BR><BR><BR><BR><BR>-------------------------------------------------------<BR>This SF.net email is sponsored by: SF.net Giveback Program.<BR>Does SourceForge.net help you be more productive? Does it<BR>help you create better code? SHARE THE LOVE, and help us help<BR>YOU! Click Here: http://sourceforge.net/donate/<BR>_______________________________________________<BR>Nagios-users mailing list<BR>Nagios-users@lists.sourceforge.net<BR>https://lists.sourceforge.net/lists/listinfo/nagios-users<BR>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<BR>::: Messages without supporting info will risk being sent to /dev/null</BLOCKQUOTE></DIV><p><br><hr size=1><font face=arial size=-1>Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !<br>
<a href=http://fr.mail.yahoo.com>Testez le nouveau Yahoo! Mail</a></font>