<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<tt>I got the same problem when I installed APAN on Nagios. I ended up
hacking the snmp.sh that come with APAN. One of the shell variables
was not getting set correctly, so I ended up creating a work around.
The $NF variable in the following line needs to 4, however I cannot
find where it gets set. This $VALUE is the output line that APAN has
to parse. The fourth value is the actual snmp value APAN is looking
for. </tt><br>
<br>
<br>
<tt> COUNTER=`echo $VALUE|awk '{print $NF}'`</tt><br>
<br>
<tt>I added the following and APAN began to work like champ. </tt><br>
<br>
<tt>#It would seem the $NF variable is not getting set</tt><br>
<tt>NF=4</tt><br>
<tt>#echo "$NF"</tt><br>
<tt> STATUS=$?</tt><br>
<tt> COUNTER=`echo $VALUE|awk '{print $NF}'`</tt><br>
<br>
<tt>My shell scripting is not great. I am sure someone else could
pretty this up. Hope this helps. </tt><br>
<pre class="moz-signature" cols="72">--
Timothy Stoddard
</pre>
<br>
HUDRY Olivier wrote:<br>
<blockquote type="cite"
cite="mid4A7F0CFD7524F2479E23018A4E840B363B069D@gipexch.gip.gip-cps.fr">
<title>Message</title>
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2800.1458" name="GENERATOR">
<div><font face="Arial" size="2">
<div><font face="Arial" size="2"><span class="180191109-26082004">hi,</span></font></div>
<div> </div>
<div><font face="Arial" size="2"><span class="180191109-26082004">I'm
trying to monitor some disk usage with apan-sql</span></font></div>
<div><font face="Arial" size="2"><span class="180191109-26082004">i've
created:</span></font></div>
<div><font face="Arial" size="2"><span class="180191109-26082004">-
service in nagios</span></font></div>
<div><font face="Arial" size="2"><span class="180191109-26082004">-
serviceext</span></font></div>
<div><font face="Arial" size="2"><span class="180191109-26082004">-
database record with apanconf</span></font></div>
<div> </div>
<div><span class="180191109-26082004"><font face="Arial" size="2">and
i'can't get info from this plug-in.</font></span></div>
<div> </div>
<div><span class="180191109-26082004"><font face="Arial" size="2">the
message in nagios is:</font></span></div>
<div> </div>
<div><span class="180191109-26082004">(Return code of 127 is out of
bounds - plugin may be missing) </span></div>
<div> </div>
<div><span class="180191109-26082004"><font face="Arial" size="2">thanks
for your help</font></span></div>
</font></div>
<div> </div>
<div dir="ltr" align="left"><font face="Arial" size="2">-----------------------------------------------------</font></div>
<div dir="ltr" align="left"><font face="Arial" size="2">
Olivier HUDRY</font></div>
<div dir="ltr" align="left"><font face="Arial" size="2">Technicien
d'exploitation - Pôle E&A</font></div>
<div dir="ltr" align="left"><font face="Arial" size="2"> <a
href="mailto:o.hudry@gip-cps.fr">o.hudry@gip-cps.fr</a></font></div>
<div dir="ltr" align="left"><font face="Arial" size="2">-----------------------------------------------------</font></div>
<div> </div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>