[mrtg] Re: MRTG 2.9.17 w/LoadMIBs option

nate mrtg at aphroland.org
Wed Oct 16 22:36:25 MEST 2002


Mike Mitchell said:
> It is case sensitive, but my copy of squid's mib.txt file shows
> cacheMedianTime, just like you have it listed.  The MIB parsing routines
> in MRTG have no problem with squid's mib.txt file.  It expands
> cacheMedianTime to 1.3.6.1.4.1.3495.1.3.2.2.1.1
>
> Check the 'Loadmibs:' statement again and make sure it has the correct
> path.
>
> Another thing to try would be to pull
> ftp://ftp.switch.ch/software/sources/network/snmp/perl/SNMP_Session-0.93.tar.gz> and install the BER.pm, SNMP_Session.pm, and SNMP_util.pm files into your
> lib/mrtg2 directory.  MRTG version 2.9.18pre2 picked up a newer version
> of the SNMP modules that might correct your problem.
> SNMP_Session-0.93.tar.gz contains the most recent versions and they can
> be dropped in without changing anything else in MRTG.

I checked LoadMIBs: line many times and the path is right, I even
tried copying the mibs to another directory and renaming it squid.mib
as a last resort and it still ignored it from what I could tell.

I tried uptgrading to SNMP_Session 0.93 by compiling and overwriting
my old SNMP_Session 0.90 but that didn't help, same message. so I restored
my SNMP_Session 0.90(since its part of the OS, other things may depend
on that version). I haven't tried upgrading to MRTG 2.9.18, but since
I am running 2.9.17 thats only a .01 difference..but the MIB thing
isn't as important anymore(see below) but it would still be nice to get
it working. Can you(or someone) who has LoadMIBs working run strace
or something on mrtg while it runs to see if it opens the mib file for
you? Maybe it is opening it in a way that strace can't see(from what I've
heard strace is by no means foolproof).

but I got a bit further in finding a
MIB->OID translation tool. I found a library/tool named libsmi/smidump

e.g.:
$ smidump --format=identifiers /usr/lib/squid/mib.txt  | grep -i
cachemediantimeSQUID-MIB cacheMedianTime               1.3.6.1.4.1.3495.1.3.2.2.1.1

$ snmpwalk -v 1 -p 3401 localhost public .1.3.6.1.4.1.3495.1.3.2.2.1.1
enterprises.3495.1.3.2.2.1.1.1 = 1
enterprises.3495.1.3.2.2.1.1.5 = 5
enterprises.3495.1.3.2.2.1.1.60 = 60

$ snmpwalk -v 1 -p 3401 localhost public .1.3.6.1.4.1.3495.1.3.2.2.1.1.5
enterprises.3495.1.3.2.2.1.1.5 = 5

so, the OID I want to query is .1.3.6.1.4.1.3495.1.3.2.2.1.1.5. In my
conf file I put this as the target:
Target[squid.cache.client.usage]:
".1.3.6.1.4.1.3495.1.3.2.2.1.1.5:public at localhost:3401"

(it's wordwrapped again, but trust me its all on one line!)

when I run it through MRTG I get the same message:

$ mrtg squid.conf2
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.2.1.2.2.1.10.5)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].3401)
                  community: "public"
                 request ID: -1467326778
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/lib/perl5/SNMP_util.pm line 456
SNMPGET Problem for ifInOctets.5 ifOutOctets.5 sysUptime sysName on
public at localhost:3401
 at /usr/bin/mrtg line 1496
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''


Now I'm really lost.. I mean I'm telling MRTG *exactly* what to
query I think(snmpwalk understands it, even without the MIB) but
it still errors out.

thanks again for all the quick replies!

nate



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list