[mrtg] MRTG not honouring mib file
dan.mcdonald at austinenergy.com
Wed Oct 6 15:24:15 CEST 2010
On 10/6/10 5:00 AM, "Babu C" <babscontact at rediffmail.com> wrote:
> Hi List,
> As I suspect my issue is something to do with mrtg I am posting it
> here, I have upgraded the squid box to 3.1.8 and everything is working
> fine except the graph part with mrtg.
> LoadMIBs: /usr/local/etc/mrtg/squid.mib
> EnableIPv6: no
> WorkDir: /usr/local/www/apache22/data
> Options[_]: bits,growright
> 2010-10-04 12:37:33 -- Unknown SNMP var cacheHttpHits
> at /usr/local/bin/mrtg line 2242
> All I could make out from these error was mrtg not reading squid.mib
> file. Am I right?
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, in
the proper order.
For example, my LoadMibs statement is a single line (excuse the
word-wrapping here) that reads as:
To trck this down, look in the squid.mib file for the IMPORTS section. This
example from the CISCO-PROCESS-MIB (3rd file in my LoadMibs statement) might
So, I needed to load the CISCO-SMI and the CISCO-TC in order to have the
proper entities defined to read the CISCO-PROCESS-MIB. The parser does
contain most of the SNMPv2-SMI and SNMPv2-TC entities baked in, so you don't
have to go find those.
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.
More information about the mrtg