[mrtg] Re: Problem reading specific OID
Robert Knotek
robert.knotek at brainforce.co.at
Wed Oct 13 11:21:52 MEST 1999
Thanks.
I adapted your script and not it seems to work.
best regards
---
Ing. Robert KNOTEK
IS-Manager
BRAIN FORCE SOFTWARE AG
Gumpendorferstr. 83 / 1 / 1
A-1060 Wien
Tel: ++43 +1 59951 21
Fax: ++43 +1 59951 13
email: robert.knotek at brainforce.co.at
-----Original Message-----
From: Alex van den Bogaerdt [SMTP:alex at slot.hollandcasino.nl]
Sent: Tuesday, October 12, 1999 12:37 AM
To: Robert Knotek
Cc: MRTG users
Subject: [mrtg] Re: Problem reading specific OID
> The following error occoures.
>
>
> cannot encode Object ID .1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348672: Cannot encode subid 2872348672 at SNMP_util.pm line 957.
> SNMPGET: Failed to reach target: ".1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348672&.1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348673:publ
> ic at svvie4". I tried multiple times!
Hmmm, 2872348672 == 0xAB349000 ...
Looks like this problem could have to do with signed integers.
I wouldn't know if this is an SNMP_util problem or that the OID is wrong.
Instead of correcting the problem (which you can't or else you wouldn't ask
this question) you may want to work around it:
Inside MRTG:
Target[SVVIE4_CPU]: `get_cpu_for svvie4 public`
and a script called "get_cpu_for":
#!/bin/bash
A=`snmpget $1 $2 .1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348672 \
| sed 's/^.*"//;s/\%.*$//'`
B=`snmpget $1 $2 .1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348673 \
| sed 's/^.*"//;s/\%.*$//'`
echo $A
echo $B
echo some time
echo $1
Todo: check (and correct, if necessary) the script. Build in some error
checking.
HTH
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list