[mrtg] MRTG not honouring mib file
Babu C
babscontact at rediffmail.com
Thu Oct 7 08:13:05 CEST 2010
On Wed, 06 Oct 2010 23:26:30 +0530 wrote
>>>
>I ran the script with the path to the squid 3.1.8 MIB file as its only
>argument.
>It returned a list of textual strings to OID numbers and the line
>"Loaded 114 OIDs".
>Mike Mitchell
>>>
Hi Mike,
First of a big thank you for the reply and that great perl script, it
did the work, as it was supposed to do, though I need to do some
changes and learn little bit about perl( in fact ur script again made
me to start learning perl). Below are the changes I needed to make it
running under FreeBSD 8.1 ( hope that may be helpful to someone & saves
the time)
Changed the following line from
use lib qw(/usr/local/etc/mrtg/lib/mrtg2)
to
use lib qw(/usr/local/lib/perl5/site_perl/5.10.1);
( note the semicolon, I had to do some debug to find out what was wrong
with that line, pls keep in mind that I am absolutely zero with perl)
Voila that makes that script to bring all mib values extracted from the
mib file in a beautiful way.
I did check the permissions also.
-r--r--r-- 1 mrtg wheel 30845 Oct 4 11:28 squid.mib
Anyway I am trying to get it run as root initially
But still my problem persist as even I run the script as root the
errors are still there in mrtg log.
>>>>
>Yes, the mib parser doesn't know what to do with IMPORTS. You need to
>manually track down the dependencies and add them to your LoadMibs
>line, inthe proper order.
>The netSNMP toolset does know to look in the mib directory for the
>IMPORTS,
>and will follow the chain automatically. That's why snmpwalk works
>fine,
>and MRTG is confused.
>Note also that LoadMibs is a global configuration command, and that
>only the last one in the config file is used.
>>>>
Thanx Daniel for the detailed reply,
The squid.mib import statement is as following(copied from squid.mib
file)
IMPORTS
enterprises, Unsigned32, TimeTicks, Gauge32, Counter32,
MODULE-IDENTITY, OBJECT-TYPE, Integer32
FROM SNMPv2-SMI
DisplayString, TEXTUAL-CONVENTION
FROM SNMPv2-TC
InetAddressType, InetAddress
FROM INET-ADDRESS-MIB;
If I correctly understood your statement then it needs 3 mib files to
understand squid.mib, they are
SNMPv2-SMI,SNMPv2-TC,INET-ADDRESS-MIB mib files. Correct?
So as per the steps you mentioned I changed my LoadMIBs statement as
following
(sorry for the wrapping)
LoadMIBs: /usr/local/etc/mrtg/SNMPv2-SMI.txt
/usr/local/etc/mrtg/SNMPv2-TC.txt /usr/local/etc/mrtg/INET-ADDRESS-
MIB.txt /usr/local/etc/mrtg/squid.mib
Or did I make mistake here? Anyway still the mrtg log shows errors
Thanx a lot
Babs
(sorry for merging both of your mails together to single reply)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101007/c7620bb3/attachment-0001.htm
More information about the mrtg
mailing list