<br><font size=2 face="sans-serif">After allowing the service checks to run for a while, I'm finding that the service status is oscillating between OK and UNKNOWN. So it's working sometimes, and sometimes it's not. Yikes.</font>
<br>
<br><font size=2 face="sans-serif">It doesn't seem likely that this has anything to do with timeouts or missed thresholds (I'm going to try increasing them anyway).</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">__________________</font>
<br>
<br>
<br>
<br><font size=2>It's doing what it is supposed to do -- returning zero.</font><font size=3> </font>
<br>
<br><font size=2>That is also the return when running check_by_ssh on the nagios box.</font><font size=3> </font>
<br>
<br><font size=2>Scott</font><font size=3> </font>
<br>
<br>
<br><font size=1>----- Forwarded by Scott Zak/IST/CSUSO on 12/27/04 01:18 PM -----</font><font size=3> </font>
<br>
<table width=100%>
<tr valign=top>
<td width=0%>
<td width=31%><font size=1><b>D Brian Hendrix <dhendrix2@csc.com></b></font><font size=3> </font>
<br>
<br><font size=1>12/27/04 12:57 PM</font><font size=3> </font>
<br>
<td width=68%><font size=1> </font>
<br><font size=1> To: "Scott Zak" <ZakS@sysoff.ctstateu.edu></font><font size=3> </font>
<br><font size=1> cc: </font><font size=3> </font>
<br><font size=1> Subject: Re: [Nagios-users] Status Unknown w/check_by_ssh. Command line OK.</font></table>
<br>
<br>
<br>
<br>
<br>
<br>
<br><font size=2>Scott,</font>
<br>
<br><font size=2>When you run the command on the Sun box, what is the error code returned?</font>
<br>
<br><font size=2>Use the following command:</font>
<br><font size=2>> echo $?</font>
<br>
<br><font size=2>You should get a zero (0) if successful, or a one (1) or higher if not</font>
<br><font size=2>successful.</font>
<br>
<br><font size=2>(Embedded image moved to file: pic06900.gif)</font>
<br><font size=2>Brian Hendrix</font>
<br><font size=2>Senior System Administrator - DCI</font>
<br><font size=2>IT/9KIDD, Baptist Hospital</font>
<br><font size=2>2000 Church Street, Nashville, TN 37062</font>
<br><font size=2>(615) 284-5297 work</font>
<br><font size=2>(615) 222-1704 fax</font>
<br><font size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font>
<br><font size=2>Whatever you do, do your work heartily,</font>
<br><font size=2>as for the Lord rather than for men</font>
<br><font size=2>- Colossians 3:23</font>
<br><font size=2>~~~ ><> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font>
<br>
<br>
<br><font size=2> </font>
<br><font size=2> "Scott Zak" </font>
<br><font size=2> <ZakS@sysoff.ctst </font>
<br><font size=2> ateu.edu> To </font>
<br><font size=2> Sent by: nagios-users@lists.sourceforge.net </font>
<br><font size=2> nagios-users-admi cc </font>
<br><font size=2> n@lists.sourcefor </font>
<br><font size=2> ge.net Subject </font>
<br><font size=2> [Nagios-users] Status Unknown </font>
<br><font size=2> w/check_by_ssh. Command line OK. </font>
<br><font size=2> 12/27/2004 11:52 </font>
<br><font size=2> AM </font>
<br><font size=2> </font>
<br><font size=2> </font>
<br><font size=2> </font>
<br><font size=2> </font>
<br>
<br>
<br>
<br>
<br>
<br><font size=2>Hi ,</font>
<br>
<br><font size=2>I'm setting up check_by_ssh to invoke a script via forced command on a</font>
<br><font size=2>remote server to check a service status. The script returns the correct</font>
<br><font size=2>status on the server where it lives, and when I run check_by_ssh on the</font>
<br><font size=2>command-line, all is well. Nagios runs the remote command (and displays</font>
<br><font size=2>the contents of stdout on the status detail page), but the status always</font>
<br><font size=2>comes back 'Unknown'.</font>
<br>
<br><font size=2>Command-line:</font>
<br><font size=2>[nagios@nagios1]$ libexec/check_by_ssh -H 149.152.10.183 -l remoteuser -i</font>
<br><font size=2>/path/to/rsa/identity_key -C 'LDAP'</font>
<br><font size=2>LDAP daemon is running.</font>
<br>
<br><font size=2>When nagios runs the service check, the same 'LDAP daemon is running.'</font>
<br><font size=2>message appears in the status information, but the status is nevertheless</font>
<br><font size=2>marked as hard 'UNKNOWN'.</font>
<br>
<br><font size=2>Here's checkcommands.cfg:</font>
<br>
<br><font size=2>define command{</font>
<br><font size=2> command_name check-cp-ldap</font>
<br><font size=2> command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l remoteuser</font>
<br><font size=2>-i /path/to/rsa/identity_key -C 'LDAP'</font>
<br><font size=2>}</font>
<br>
<br><font size=2>This is the status log entry:</font>
<br><font size=2>[1104169159]</font>
<br><font size=2>SERVICE;soluminis1;LDAP;UNKNOWN;3/3;HARD;1104169025;1104169205;ACTIVE;</font>
<br><font size=2>1;1;1;1104157840;0;UNKNOWN;3706;335959;419;530;1104165074;2;1;0;1;1;0;0.00;0;1;1;1;LDAP</font>
<br><font size=2>daemon is running.</font>
<br>
<br>
<br><font size=2>Nagios is running on RH Linux, and the target host is Solaris 9. Nagios'</font>
<br><font size=2>SSH is OpenSSH and the Solaris box is running Sun_SSH_1.0, protocol</font>
<br><font size=2>versions 1.5/2.0. The remote script worked correctly when monitoring</font>
<br><font size=2>services on a Solaris 8 box which was running SSH Secure Shell</font>
<br><font size=2>(non-commercial license). Check_by_ssh is from nagios-plugins 1.4.0alpha1,</font>
<br><font size=2>version 1.18.</font>
<br>
<br><font size=2>What am I not seeing? It's probably some bonehead maneuver on my part, but</font>
<br><font size=2>has anyone else run into (and found their way around) this?</font>
<br>
<br><font size=2>Scott Zak</font>
<br><font size=2>Connecticut State University System.</font>
<br>
<br>
<br><font size=2>Confidentiality Notice: This email message, including any attachments,</font>
<br><font size=2>contains</font>
<br><font size=2>information that is confidential and/or legally privileged. The information</font>
<br><font size=2>is intended</font>
<br><font size=2>only for the individual(s) named above. If you are not the intended</font>
<br><font size=2>recipient or the</font>
<br><font size=2>person responsible for delivering the email to the intended recipient, be</font>
<br><font size=2>advised that</font>
<br><font size=2>you have received this email in error and that any use, dissemination,</font>
<br><font size=2>distribution,</font>
<br><font size=2>forwarding, printing, or copying of this email is strictly prohibited. If</font>
<br><font size=2>you have received</font>
<br><font size=2>this email in error, please purge it immediately and notify the sender.</font>
<br><font size=3> </font>
<br>
<br>