This is a discussion on [mrtg] Odd problem with squid mibs.. within the MRTG forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --===============0691837329== Content-class: urn:content-classes:message Content-Type: multipart/alternative; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--===============0691837329== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C88F7B.F869973A" This is a multi-part message in MIME format. ------_=_NextPart_001_01C88F7B.F869973A Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable 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. =20 On 2.11.1 I had no problems at all with this config, using the same daemon_mode.cfg and everything. =20 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. =20 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. =20 If I run the config manually, i.e.: =20 env LANG=3DC /usr/bin/mrtg --logging /var/log/mrtg.log squid_server.cfg =20 All works fine. =20 If I load it with my daemon mode config, it starts to break. =20 My init script sets LANG=3DC near the top of the file, and passes mrtg: the following parameters: /etc/mrtg/daemon_mode.cfg --logging /var/log/mrtg.log =20 =20 My daemon_mode.cfg looks like this (actual server names removed): RunAsDaemon: Yes Interval: 5 EnableIPv6: no =20 Include: /etc/mrtg/router.cfg Include: /etc/mrtg/switch1.cfg Include: /etc/mrtg/switch2.cfg Include: /etc/mrtg/ciscoswitch_cpu.cfg Include: /etc/mrtg/server1.cfg Include: /etc/mrtg/squid_server.cfg Include: /etc/mrtg/ups.cfg .... =20 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) =20 In daemon mode this target works: Target[squid_server-reqhitratios]: cacheRequestHitRatio.5&cacheRequestHitRatio.60:com munity@server:3401 =20 It graphs perfectly fine, with no errors. =20 In daemon mode this target causes an error: Target[squid_server-hit]: cacheHttpHits&cacheServerRequests:community@server :3401 =20 In my mrtg.log I get: =20 2008-03-26 15:01:15 -- Unknown SNMP var cacheServerRequests at /usr/bin/mrtg line 2199 =20 However, cacheServerRequests is declared in the same mibfile as cacheRequestHitRatio. =20 My loadmib for squid_server.cfg looks like: LoadMIBs: /usr/share/snmp/mibs/SQUID-MIB.txt, /usr/share/snmp/mibs/UCD-SNMP-MIB.txt =20 And I can verify that variable in that same mibfile works properly with snmpget: =20 # snmpget -m /usr/share/snmp/mibs/SQUID-MIB.txt -v1 -c community squid_server:3401 cacheServerRequests SQUID-MIB::cacheServerRequests.0 =3D INTEGER: 4715641 =20 I can also verify that neither variable works without manually loading the mibfile: =20 # snmpget -v1 -c community squid_server:3401 cacheServerRequests cacheServerRequests: Unknown Object Identifier (Sub-id not found: (top) -> cacheServerRequests) # snmpget -v1 -c community squid_server:3401 cacheRequestHitRatio cacheRequestHitRatio: Unknown Object Identifier (Sub-id not found: (top) -> cacheRequestHitRatio) =20 =20 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? =20 I've also already verified no other mib file on the system declares anything named cacheServerRequests: =20 # grep "cacheServerRequests" /usr/share/snmp/mibs/* /usr/share/snmp/mibs/SQUID-MIB.txt: cacheServerRequests OBJECT-TYPE # =20 =20 =20 =20 =20 =20 =20 =20 =20 ------_=_NextPart_001_01C88F7B.F869973A Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns=3D"http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style> </head> <body lang=3DEN-US link=3Dblue vlink=3Dpurple> <div class=3DSection1> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>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.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>On 2.11.1 I had no problems at all with this config, = using the same daemon_mode.cfg and everything.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>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.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>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.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>If I run the config manually, = i.e.:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>env LANG=3DC /usr/bin/mrtg --logging = /var/log/mrtg.log squid_server.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>All works fine.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>If I load it with my daemon mode config, it starts to = break.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>My init script sets LANG=3DC near the top of the = file, and passes mrtg: the following parameters: /etc/mrtg/daemon_mode.cfg = --logging /var/log/mrtg.log<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>My daemon_mode.cfg looks like this (actual server = names removed):<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>RunAsDaemon: Yes<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Interval: = 5<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>EnableIPv6: no<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/router.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/switch1.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/switch2.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/ciscoswitch_cpu.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/server1.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/squid_server.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Include: = /etc/mrtg/ups.cfg<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>...<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Each config file has its own LoadMIBs, when needed. = This particular server is the 3<sup>rd</sup> 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)<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>In daemon mode this target = works:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Target[squid_server-reqhitratios]: cacheRequestHitRatio.5&cacheRequestHitRatio.60 :community@server:3401<= o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>It graphs perfectly fine, with no = errors.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>In daemon mode this target causes an = error:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Target[squid_server-hit]: cacheHttpHits&cacheServerRequests:community@se rver:3401<o:p></o:p></s= pan></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>In my mrtg.log I get:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>2008-03-26 15:01:15 -- Unknown SNMP var = cacheServerRequests<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> at /usr/bin/mrtg line = 2199<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>However, cacheServerRequests is declared in the same = mibfile as cacheRequestHitRatio.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>My loadmib for squid_server.cfg looks = like:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>LoadMIBs: /usr/share/snmp/mibs/SQUID-MIB.txt, /usr/share/snmp/mibs/UCD-SNMP-MIB.txt<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>And I can verify that variable in that same mibfile = works properly with snmpget:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'># snmpget -m /usr/share/snmp/mibs/SQUID-MIB.txt = –v1 -c community squid_server:3401 = cacheServerRequests<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>SQUID-MIB::cacheServerRequests.0 =3D INTEGER: = 4715641<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I can also verify that neither variable works without manually loading the mibfile:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'># snmpget -v1 -c community squid_server:3401 cacheServerRequests<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>cacheServerRequests: Unknown Object Identifier = (Sub-id not found: (top) -> cacheServerRequests)<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'># snmpget -v1 -c community squid_server:3401 cacheRequestHitRatio<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>cacheRequestHitRatio: Unknown Object Identifier = (Sub-id not found: (top) -> cacheRequestHitRatio)<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>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?<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I’ve also already verified no other mib file on = the system declares anything named = cacheServerRequests:<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'># grep "cacheServerRequests" /usr/share/snmp/mibs/*<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>/usr/share/snmp/mibs/SQUID-MIB.txt: &= nbsp; cacheServerRequests OBJECT-TYPE<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>#<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> </div> </body> </html> ------_=_NextPart_001_01C88F7B.F869973A-- --===============0691837329== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ mrtg mailing list mrtg@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/mrtg --===============0691837329==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|