<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:sans-serif;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I had this happening when I had multiple
nagios processes running. You should check that out.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Scott Yem</span></font><font
color=navy face=Arial><span style='font-family:Arial;color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Research
Computing Services</span></font><font color=navy face=Arial><span
style='font-family:Arial;color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Agilent
Laboratories</span></font><font color=navy face=Arial><span style='font-family:
Arial;color:navy'><o:p></o:p></span></font></p>
</div>
<div>
<div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal style='margin-left:.5in'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> nagios-users-admin@lists.sourceforge.net
[mailto:nagios-users-admin@lists.sourceforge.net] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Scott Zak<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, December 27, 2004
1:27 PM<br>
<b><span style='font-weight:bold'>To:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Nagios-users] Re: Status
oscillates w/check_by_ssh.</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
</span></font><font size=2 face=sans-serif><span style='font-size:10.0pt;
font-family: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.</span></font> <br>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family: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).</span></font> <br>
<br>
<br>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family:sans-serif'>__________________</span></font>
<br>
<br>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>It's doing what it is supposed to
do -- returning zero.</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>That is also the return when
running check_by_ssh on the nagios box.</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>Scott</span></font> <br>
<br>
<br>
<font size=1><span style='font-size:7.5pt'>----- Forwarded by Scott
Zak/IST/CSUSO on 12/27/04 01:18 PM -----</span></font> <o:p></o:p></p>
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style='width:100.0%;margin-left:.5in'>
<tr>
<td width="0%" valign=top style='width:.58%;padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</td>
<td width="30%" valign=top style='width:30.6%;padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><b><font size=1 face="Times New Roman"><span
style='font-size:7.5pt;font-weight:bold'>D Brian Hendrix
<dhendrix2@csc.com></span></font></b> <br>
<br>
<font size=1><span style='font-size:7.5pt'>12/27/04 12:57 PM</span></font> <o:p></o:p></p>
</td>
<td width="67%" valign=top style='width:67.44%;padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:7.5pt'> </span></font><br>
<font size=1><span style='font-size:7.5pt'> To:
"Scott Zak"
<ZakS@sysoff.ctstateu.edu></span></font> <br>
<font size=1><span style='font-size:7.5pt'> cc:
</span></font> <br>
<font size=1><span style='font-size:7.5pt'>
Subject: Re: [Nagios-users] Status Unknown
w/check_by_ssh. Command line OK.</span></font><o:p></o:p></p>
</td>
</tr>
</table>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
<br>
<br>
<br>
<br>
<br>
<br>
</span></font><font size=2><span style='font-size:10.0pt'>Scott,</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>When you run the command on the Sun
box, what is the error code returned?</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>Use the following command:</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> echo $?</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>You should get a zero (0) if
successful, or a one (1) or higher if not</span></font> <br>
<font size=2><span style='font-size:10.0pt'>successful.</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>(Embedded image moved to file:
pic06900.gif)</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Brian Hendrix</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Senior System Administrator - DCI</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>IT/9KIDD, Baptist Hospital</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>2000 Church Street, Nashville, TN
37062</span></font> <br>
<font size=2><span style='font-size:10.0pt'>(615) 284-5297 work</span></font> <br>
<font size=2><span style='font-size:10.0pt'>(615) 222-1704 fax</span></font> <br>
<font size=2><span style='font-size:10.0pt'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Whatever you do, do your work
heartily,</span></font> <br>
<font size=2><span style='font-size:10.0pt'>as for the Lord rather than for men</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>- Colossians 3:23</span></font> <br>
<font size=2><span style='font-size:10.0pt'>~~~ ><>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></font> <br>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
"Scott Zak"
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
<ZakS@sysoff.ctst
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
ateu.edu>
To </span></font><br>
<font size=2><span style='font-size:10.0pt'>
Sent by:
nagios-users@lists.sourceforge.net </span></font> <br>
<font size=2><span style='font-size:10.0pt'>
nagios-users-admi
cc </span></font><br>
<font size=2><span style='font-size:10.0pt'>
n@lists.sourcefor
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
ge.net
Subject </span></font><br>
<font size=2><span style='font-size:10.0pt'>
[Nagios-users] Status Unknown </span></font><br>
<font size=2><span style='font-size:10.0pt'>
w/check_by_ssh. Command line OK. </span></font><br>
<font size=2><span style='font-size:10.0pt'>
12/27/2004 11:52
</span></font> <br>
<font size=2><span style='font-size:10.0pt'>
AM
</span></font> <br>
<font size=2><span style='font-size:10.0pt'>
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
</span></font><br>
<font size=2><span style='font-size:10.0pt'>
</span></font><br>
<br>
<br>
<br>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>Hi ,</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>I'm setting up check_by_ssh to
invoke a script via forced command on a</span></font> <br>
<font size=2><span style='font-size:10.0pt'>remote server to check a service
status. The script returns the correct</span></font> <br>
<font size=2><span style='font-size:10.0pt'>status on the server where it
lives, and when I run check_by_ssh on the</span></font> <br>
<font size=2><span style='font-size:10.0pt'>command-line, all is well.
Nagios runs the remote command (and displays</span></font> <br>
<font size=2><span style='font-size:10.0pt'>the contents of stdout on the
status detail page), but the status always</span></font> <br>
<font size=2><span style='font-size:10.0pt'>comes back 'Unknown'.</span></font>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>Command-line:</span></font> <br>
<font size=2><span style='font-size:10.0pt'>[nagios@nagios1]$
libexec/check_by_ssh -H 149.152.10.183 -l remoteuser -i</span></font> <br>
<font size=2><span style='font-size:10.0pt'>/path/to/rsa/identity_key -C
'LDAP'</span></font> <br>
<font size=2><span style='font-size:10.0pt'>LDAP daemon is running.</span></font>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>When nagios runs the service check,
the same 'LDAP daemon is running.'</span></font> <br>
<font size=2><span style='font-size:10.0pt'>message appears in the status
information, but the status is nevertheless</span></font> <br>
<font size=2><span style='font-size:10.0pt'>marked as hard 'UNKNOWN'.</span></font>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>Here's checkcommands.cfg:</span></font>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>define command{</span></font> <br>
<font size=2><span style='font-size:10.0pt'>
command_name check-cp-ldap</span></font> <br>
<font size=2><span style='font-size:10.0pt'>
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l
remoteuser</span></font> <br>
<font size=2><span style='font-size:10.0pt'>-i /path/to/rsa/identity_key -C
'LDAP'</span></font> <br>
<font size=2><span style='font-size:10.0pt'>}</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>This is the status log entry:</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>[1104169159]</span></font> <br>
<font size=2><span style='font-size:10.0pt'>SERVICE;soluminis1;LDAP;UNKNOWN;3/3;HARD;1104169025;1104169205;ACTIVE;</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>1;1;1;1104157840;0;UNKNOWN;3706;335959;419;530;1104165074;2;1;0;1;1;0;0.00;0;1;1;1;LDAP</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>daemon is running.</span></font> <br>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>Nagios is running on RH Linux, and
the target host is Solaris 9. Nagios'</span></font> <br>
<font size=2><span style='font-size:10.0pt'>SSH is OpenSSH and the Solaris box
is running Sun_SSH_1.0, protocol</span></font> <br>
<font size=2><span style='font-size:10.0pt'>versions 1.5/2.0. The remote
script worked correctly when monitoring</span></font> <br>
<font size=2><span style='font-size:10.0pt'>services on a Solaris 8 box which
was running SSH Secure Shell</span></font> <br>
<font size=2><span style='font-size:10.0pt'>(non-commercial license).
Check_by_ssh is from nagios-plugins 1.4.0alpha1,</span></font> <br>
<font size=2><span style='font-size:10.0pt'>version 1.18.</span></font> <br>
<br>
<font size=2><span style='font-size:10.0pt'>What am I not seeing? It's
probably some bonehead maneuver on my part, but</span></font> <br>
<font size=2><span style='font-size:10.0pt'>has anyone else run into (and found
their way around) this?</span></font> <br>
<br>
<st1:place w:st="on"><st1:PlaceName w:st="on"><font size=2><span
style='font-size:10.0pt'>Scott</span></font></st1:PlaceName><font size=2><span
style='font-size:10.0pt'> <st1:PlaceName w:st="on">Zak</st1:PlaceName></span></font>
<br>
<st1:PlaceName w:st="on"><font size=2><span style='font-size:10.0pt'>Connecticut</span></font></st1:PlaceName><font
size=2><span style='font-size:10.0pt'> <st1:PlaceType w:st="on">State</st1:PlaceType>
<st1:PlaceType w:st="on">University</st1:PlaceType></span></font></st1:place><font
size=2><span style='font-size:10.0pt'> System.</span></font> <br>
<br>
<br>
<font size=2><span style='font-size:10.0pt'>Confidentiality Notice: This email
message, including any attachments,</span></font> <br>
<font size=2><span style='font-size:10.0pt'>contains</span></font> <br>
<font size=2><span style='font-size:10.0pt'>information that is confidential
and/or legally privileged. The information</span></font> <br>
<font size=2><span style='font-size:10.0pt'>is intended</span></font> <br>
<font size=2><span style='font-size:10.0pt'>only for the individual(s) named
above. If you are not the intended</span></font> <br>
<font size=2><span style='font-size:10.0pt'>recipient or the</span></font> <br>
<font size=2><span style='font-size:10.0pt'>person responsible for delivering
the email to the intended recipient, be</span></font> <br>
<font size=2><span style='font-size:10.0pt'>advised that</span></font> <br>
<font size=2><span style='font-size:10.0pt'>you have received this email in
error and that any use, dissemination,</span></font> <br>
<font size=2><span style='font-size:10.0pt'>distribution,</span></font> <br>
<font size=2><span style='font-size:10.0pt'>forwarding, printing, or copying of
this email is strictly prohibited. If</span></font> <br>
<font size=2><span style='font-size:10.0pt'>you have received</span></font> <br>
<font size=2><span style='font-size:10.0pt'>this email in error, please purge
it immediately and notify the sender.</span></font> <br>
<o:p></o:p></p>
</div>
</body>
</html>