apan snmp plugin problem
Tim Stoddard
testoddard at ualr.edu
Thu Aug 26 18:35:32 CEST 2004
In the APAN plugin directory the file named snmp.sh. I am running APAN
0.3.0. Here is a context diff.
*** snmp.sh.orig Thu Aug 26 11:27:40 2004
--- snmp.sh Fri Aug 20 10:47:01 2004
***************
*** 10,15 ****
--- 10,19 ----
COMM=`echo $ARG|cut -d ":" -f 1`
OID=`echo $ARG|cut -d ":" -f 2`
VALUE=`$PLUGINSDIR/check_snmp -H $HOST -C $COMM -m none
-o $OID`
+ #It would seem the $NF variable is not getting set
+ NF=4
+ #echo "$NF"
STATUS=$?
COUNTER=`echo $VALUE|awk '{print $NF}'`
if [ $STATUS -gt 0 ]; then
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.
--
Timothy Stoddard
HUDRY Olivier wrote:
> where have U put these lines in your script ?
>
> and i've another problem with apan...
> I can't put the icon and link in the services
>
> -----Message d'origine-----
> De : Tim Stoddard [mailto:testoddard at ualr.edu]
> Envoyé : jeudi 26 août 2004 16:20
> À : HUDRY Olivier
> Cc : nagios-users at lists.sourceforge.net
> Objet : Re: [Nagios-users] apan snmp plugin problem
>
> 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.
>
>
> COUNTER=`echo $VALUE|awk '{print $NF}'`
>
> I added the following and APAN began to work like champ.
>
> #It would seem the $NF variable is not getting set
> NF=4
> #echo "$NF"
> STATUS=$?
> COUNTER=`echo $VALUE|awk '{print $NF}'`
>
> My shell scripting is not great. I am sure someone else could
> pretty this up. Hope this helps.
>
>--
>
>Timothy Stoddard
>
>
>
> HUDRY Olivier wrote:
>
>> hi,
>>
>> I'm trying to monitor some disk usage with apan-sql
>> i've created:
>> - service in nagios
>> - serviceext
>> - database record with apanconf
>>
>> and i'can't get info from this plug-in.
>>
>> the message in nagios is:
>>
>> (Return code of 127 is out of bounds - plugin may be missing)
>>
>> thanks for your help
>>
>> -----------------------------------------------------
>> Olivier HUDRY
>> Technicien d'exploitation - Pôle E&A
>> o.hudry at gip-cps.fr <mailto:o.hudry at gip-cps.fr>
>> -----------------------------------------------------
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040826/76f066e6/attachment.html>
More information about the Users
mailing list