<!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">
<font face="Courier New, Courier, monospace">In the APAN plugin
directory the file named snmp.sh. I am running APAN 0.3.0. Here is a
context diff. <br>
<br>
*** snmp.sh.orig Thu Aug 26 11:27:40 2004<br>
--- snmp.sh Fri Aug 20 10:47:01 2004<br>
***************<br>
*** 10,15 ****<br>
--- 10,19 ----<br>
COMM=`echo $ARG|cut -d ":" -f 1`<br>
OID=`echo $ARG|cut -d ":" -f 2`<br>
VALUE=`$PLUGINSDIR/check_snmp -H $HOST -C $COMM -m none
-o $OID`<br>
+ #It would seem the $NF variable is not getting set<br>
+ NF=4<br>
+ #echo "$NF"<br>
STATUS=$?<br>
COUNTER=`echo $VALUE|awk '{print $NF}'`<br>
if [ $STATUS -gt 0 ]; then<br>
<br>
APAN version 0.3.0 setup my icons for me once I got all the directory
paths straightened out. The docs were very easy to follow. If I
remember correctly they were step-by-step. <br>
</font><br>
<pre class="moz-signature" cols="72">--
Timothy Stoddard
</pre>
<br>
HUDRY Olivier wrote:<br>
<blockquote type="cite"
cite="mid4A7F0CFD7524F2479E23018A4E840B363B06A2@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"><span class="677485115-26082004">where
have U put these lines in your script ?</span></font></div>
<div> </div>
<div><font face="Arial" size="2"><span class="677485115-26082004">and
i've another problem with apan...</span></font></div>
<div><font face="Arial" size="2"><span class="677485115-26082004">I
can't put the icon and link in the services</span></font></div>
<blockquote dir="ltr" style="margin-right: 0px;">
<div class="OutlookMessageHeader" lang="fr" dir="ltr" align="left"><font
face="Tahoma" size="2">-----Message d'origine-----<br>
<b>De :</b> Tim Stoddard [<a class="moz-txt-link-freetext" href="mailto:testoddard@ualr.edu">mailto:testoddard@ualr.edu</a>] <br>
<b>Envoyé :</b> jeudi 26 août 2004 16:20<br>
<b>À :</b> HUDRY Olivier<br>
<b>Cc :</b> <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<b>Objet :</b> Re: [Nagios-users] apan snmp plugin problem<br>
<br>
</font></div>
<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
cite="mid4A7F0CFD7524F2479E23018A4E840B363B069D@gipexch.gip.gip-cps.fr"
type="cite">
<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>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>