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