<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" 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)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>This is a problem that I've been having for quite some time. Searching<br>
the archives turns up a few other people reporting the same problem, but<br>
I can't find a solution.<br>
<br>
I am trying to use check_by_ssh to run the check_disk plugin on a few<br>
remote systems. When I run this from the command line, it always does<br>
the right thing. It returns the correct string and return code (checked<br>
with 'echo $?'). It works flawlessly.<br>
<br>
However, when this is set up to run through Nagios, it usually reports<br>
the check in the UNKNOWN state...even though it still gives the correct<br>
"OK..." string. Occasionally, Nagios will change it to OK or WARNING
or<br>
whatever is correct at the time, but for a good 90% of the time, it just<br>
sits there in UNKNOWN. It doesn't seem to matter if the target machine<br>
is Linux or Solaris, nor can I find any pattern to when and where it<br>
happens. Again, it *always* works perfectly when run from the command<br>
line.<br>
<br>
I've played with giving check_by_ssh a hostname instead of an IP<br>
address. I've tried it both with '-l nagios' and without (it's always<br>
run from nagios account). I've also tried the -f flag (the purpose of<br>
which I don't really understand). Nothing seems to help. For the time<br>
being, I'm just running an SNMP client to get this info into Nagios, but<br>
I'd really rather use check_by_ssh if at all possible.<br>
<br>
Has anyone else seen this problem and/or found the cause of it?<br>
<br>
Here's the exact command I'm using on the command line. This same thing<br>
is configutred in my .cfg file.<br>
<br>
check_by_ssh -H 192.168.230.112 -C<br>
'/home/utils/nagios/libexec/check_disk -w 10% -c 5% -p /var'<br>
<br>
Thanks!</span></font><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>