[mrtg] Odd problem with squid mibs..
Matt.Kettler at edocorp.com
Wed Mar 26 20:59:58 CET 2008
I have a squid monitoring configuration, which I recently ported from
one server that uses mrtg-2.11.1 onto a server running mrtg-2.16.1.
On 2.11.1 I had no problems at all with this config, using the same
daemon_mode.cfg and everything.
I brought over my MRTG config, copied my squid mibfile, etc onto the new
server. My switch configs are different in that I regenerated them using
snmp v2 commands, due to the overflows.. however, even prior to that the
squid config wasn't working on the new box.
What's strange is, mrtg-2.116.1 appears to parse some of the variables
out of my squid mibfile when operated in daemon mode, but parses other
variables out of the same mibfile just fine.
If I run the config manually, i.e.:
env LANG=C /usr/bin/mrtg --logging /var/log/mrtg.log squid_server.cfg
All works fine.
If I load it with my daemon mode config, it starts to break.
My init script sets LANG=C near the top of the file, and passes mrtg:
the following parameters: /etc/mrtg/daemon_mode.cfg --logging
My daemon_mode.cfg looks like this (actual server names removed):
Each config file has its own LoadMIBs, when needed. This particular
server is the 3rd in the config that uses LoadMIBs, and it's the only
one that loads the squid mib. None of my other configs have trouble
loading mib files that others aren't using. (ie: my ups config, which
comes later in daemon_mode.cfg)
In daemon mode this target works:
cacheRequestHitRatio.5&cacheRequestHitRatio.60:community at server:3401
It graphs perfectly fine, with no errors.
In daemon mode this target causes an error:
cacheHttpHits&cacheServerRequests:community at server:3401
In my mrtg.log I get:
2008-03-26 15:01:15 -- Unknown SNMP var cacheServerRequests
at /usr/bin/mrtg line 2199
However, cacheServerRequests is declared in the same mibfile as
My loadmib for squid_server.cfg looks like:
And I can verify that variable in that same mibfile works properly with
# snmpget -m /usr/share/snmp/mibs/SQUID-MIB.txt -v1 -c community
SQUID-MIB::cacheServerRequests.0 = INTEGER: 4715641
I can also verify that neither variable works without manually loading
# snmpget -v1 -c community squid_server:3401 cacheServerRequests
cacheServerRequests: Unknown Object Identifier (Sub-id not found: (top)
# snmpget -v1 -c community squid_server:3401 cacheRequestHitRatio
cacheRequestHitRatio: Unknown Object Identifier (Sub-id not found: (top)
What would cause a mibfile to work with snmpget, work with both MRTGs
manually, work in daemon mode on 2.11.1 but only partially work with
MRTG in Daemon mode in 2.16.1? Is it unreasonable for me to have
multiple LoadMIB statements about?
I've also already verified no other mib file on the system declares
anything named cacheServerRequests:
# grep "cacheServerRequests" /usr/share/snmp/mibs/*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mrtg