Date: 11 Oct 2010 04:30:27 -0000 From: "Babu C" <babscontact@rediffmail.com> To: <freebsd-ports@freebsd.org> Subject: MRTG not honouring squid mib file ( Broken MRTG/Net-SNMP) Message-ID: <20101011043027.2009.qmail@f4mail-235-241.rediffmail.com>
next in thread | raw e-mail | index | archive | help
Hi List, This is regarding the mrtg/net-snmp ports of Freebsd not honouring the LoadMIBs statement. I have already discussed this issue in squid mailing list and mrtg mailing list and they found this issue is happening only in the FreeBSD now I am asking the help here to resolve this issue. As I have upgraded the squid box to 3.1.8 and everything is working fine except the graph part with mrtg. Details of system as follows OS FreeBSD : 8.1 Squid : 3.1.8 MRTG : mrtg-2.16.4 My mrtg.cfg is as below LoadMIBs: /usr/local/etc/mrtg/squid.mib EnableIPv6: no WorkDir: /usr/local/www/apache22/data Options[_]: bits,growright Target[proxy-hit]: cacheHttpHits&cacheServerRequests:public@127.0.0.1:3401 MaxBytes[proxy-hit]: 100000 Title[proxy-hit]: HTTP Hits Suppress[proxy-hit]: y LegendI[proxy-hit]: HTTP hits LegendO[proxy-hit]: HTTP requests Legend1[proxy-hit]: HTTP hits Legend2[proxy-hit]: HTTP requests YLegend[proxy-hit]: perminute ShortLegend[proxy-hit]: req/min Options[proxy-hit]: nopercent, perminute, dorelpercent, unknaszero, growright, pngdate #PNGTitle[proxy-hit]: Proxy Hits Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@127.0.0.1:3401 MaxBytes[proxy-srvkbinout]: 76800 Title[proxy-srvkbinout]: Cache Server Traffic In/Out Suppress[proxy-srvkbinout]: y LegendI[proxy-srvkbinout]: Traffic In LegendO[proxy-srvkbinout]: Traffic Out Legend1[proxy-srvkbinout]: Traffic In Legend2[proxy-srvkbinout]: Traffic Out YLegend[proxy-srvkbinout]: per minute ShortLegend[proxy-srvkbinout]: b/min kMG[proxy-srvkbinout]: k,M,G,T kilo[proxy-srvkbinout]: 1024 Options[proxy-srvkbinout]: nopercent, perminute, unknaszero, growright, pngdate I have verified that squid snmp is working through the following command #snmpget -On -m /usr/local/etc/mrtg/squid.mib -v 2c -c public 127.0.0.1:3401 cacheHttpHits cacheServerRequests cacheServerInKb cacheServerOutKb cacheUptime CacheSoftware cacheVersionId This gives me results without any errors so snmp part of squid is working fine.Also snmpwalk is working fine too on squid's 3401 port. Now when I run mrtg I could see the following errors in mrtg.log file 010-10-04 12:37:33 -- Started mrtg with config '/usr/local/etc/mrtg/mrtg.cfg' 2010-10-04 12:37:33 -- Unknown SNMP var cacheHttpHits at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheServerRequests at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheUptime at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheSoftware at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheVersionId at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Use of uninitialized value $ret[-2] in concatenation (.) or string at /usr/local/bin/mrtg line 2261. 2010-10-04 12:37:33 -- Use of uninitialized value $ret[-1] in concatenation (.) or string at /usr/local/bin/mrtg line 2261. 2010-10-04 12:37:33 -- Unknown SNMP var cacheServerInKb at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheServerOutKb at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheUptime at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheSoftware at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Unknown SNMP var cacheVersionId at /usr/local/bin/mrtg line 2242 2010-10-04 12:37:33 -- Use of uninitialized value $ret[-2] in concatenation (.) or string at /usr/local/bin/mrtg line 2261. 2010-10-04 12:37:33 -- Use of uninitialized value $ret[-1] in concatenation (.) or string at /usr/local/bin/mrtg line 2261. 2010-10-04 12:37:33 -- 2010-10-04 12:37:33: ERROR: Target[proxy-hit][_IN_] ' $target->[0]{$mode} ' did not eval into defined data 2010-10-04 12:37:33 -- 2010-10-04 12:37:33: ERROR: Target[proxy-hit][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data 2010-10-04 12:37:33 -- 2010-10-04 12:37:33: ERROR: Target[proxy-srvkbinout][_IN_] ' $target->[1]{$mode} ' did not eval into defined data 2010-10-04 12:37:33 -- 2010-10-04 12:37:33: ERROR: Target[proxy-srvkbinout][_OUT_] ' $target->[1]{$mode} ' did not eval into defined data All I could make out from these error was mrtg not reading squid.mib file. Am I right? Ofcoz its not a issue of permission, also I am trying to run mrtg as root to get it started. Now I am stuck and I suspect a broken mrtg? or did I go wrong somewhere? Do kindly let me know what went wrong and how to proceed further. Thanx in advance Babs
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101011043027.2009.qmail>