[mrtg] mrtg Digest, Vol 46, Issue 3

Syed Hameeduddin Aqil syedaqil at hotmail.com
Thu Oct 7 08:16:03 CEST 2010


I have one query regarding MRTG on Windows 2003 Server platform,  I have been using mrtg from long time and it's working perfectly recently I have installed RRD Tools on mrtg-2.16.4 version, everything seems fine except when I am applying this command "perl mrtg test.cfg" it should produce the html images using rrd format but it's not as I am unable to get anything, can someone tell  how to get this html images after applying the command and path of the folder I mean where this rrd format images stored.

 

 

Regards,

 

 

 

Syed Aqil
 
> From: mrtg-request at lists.oetiker.ch
> Subject: mrtg Digest, Vol 46, Issue 3
> To: mrtg at lists.oetiker.ch
> Date: Wed, 6 Oct 2010 20:27:13 +0200
> 
> Send mrtg mailing list submissions to
> mrtg at lists.oetiker.ch
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
> or, via email, send a message with subject or body 'help' to
> mrtg-request at lists.oetiker.ch
> 
> You can reach the person managing the list at
> mrtg-owner at lists.oetiker.ch
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of mrtg digest..."
> 
> 
> Today's Topics:
> 
> 1. Monitoring the correct interface (Michael Curtis)
> 2. MRTG not honouring mib file (Babu C)
> 3. Re: MRTG not honouring mib file (Daniel McDonald)
> 4. Re: MRTG not honouring mib file (Mike Mitchell)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 5 Oct 2010 10:28:46 +0100
> From: Michael Curtis <bazmail at bazmac.co.uk>
> Subject: [mrtg] Monitoring the correct interface
> To: mrtg at lists.oetiker.ch
> Message-ID: <2CF2EE53-6971-47BD-BA96-B1B3899901E5 at bazmac.co.uk>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hi,
> 
> I have MRTG setup and running well on my Mac. What I really want to do is see how much traffic is coming and going to the Internet. I am monitoring my Apple Airport Extreme base station and Zyxel P660WHP-D1. I could get the answer from either of these two devices. Obviously the Zyxel would be the best place, but all traffic to the Internet has to go through the base station to get to the Zyxel.
> 
> Does anyone know how I can do this?
> 
> Best wishes
> 
> Michael
> 
> *****************************************************
> 
> This E-Mail has been scanned by Sophos Anti-Virus
> 
> *****************************************************
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: 6 Oct 2010 10:00:56 -0000
> From: "Babu C" <babscontact at rediffmail.com>
> Subject: [mrtg] MRTG not honouring mib file
> To: <mrtg at lists.oetiker.ch>
> Message-ID: <20101006100056.47943.qmail at f4mail201.rediffmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> 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.
> 
> 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 at 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 at 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 I think
> 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?
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101006/2153c623/attachment-0001.htm 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 06 Oct 2010 08:24:15 -0500
> From: Daniel McDonald <dan.mcdonald at austinenergy.com>
> Subject: Re: [mrtg] MRTG not honouring mib file
> To: mrtg <mrtg at lists.oetiker.ch>
> Message-ID: <C8D1E2AF.1EA61%dan.mcdonald at austinenergy.com>
> Content-Type: text/plain; charset="US-ASCII"
> 
> 
> 
> 
> 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:
> LoadMibs: /usr/share/snmp/mibs/CISCO-SMI-V1SMI.my
> /usr/share/snmp/mibs/CISCO-TC-V1SMI.my
> /usr/share/snmp/mibs/CISCO-PROCESS-MIB.my
> /usr/share/snmp/mibs/CISCO-QOS-PIB-MIB-V1SMI.my
> /usr/share/snmp/mibs/CISCO-MEMORY-POOL-MIB-V1SMI.my
> /usr/share/snmp/mibs/sa.mib /usr/share/snmp/mibs/sh2.mib
> /usr/share/snmp/mibs/ups.mib /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
> /usr/share/snmp/mibs/CISCO-FIREWALL-MIB-V1SMI.my
> /usr/share/snmp/mibs/ETHERLIKE-MIB-V1SMI.my /usr/share/snmp/mibs/apent.mib
> /usr/share/snmp/mibs/chassismgrext.mib /usr/share/snmp/mibs/cntsvcext.mib
> /usr/share/snmp/mibs/stratum100.mib /usr/share/snmp/mibs/qb.mib
> /usr/share/snmp/mibs/OLD-CISCO-INTERFACES-MIB.my
> /usr/share/snmp/mibs/itw_mib.mib /usr/share/snmp/mibs/orinoco.mib
> /usr/share/snmp/mibs/ENTITY-MIB-V1SMI.my
> /usr/share/snmp/mibs/CISCO-ENHANCED-MEMPOOL-MIB-V1SMI.my
> /usr/share/snmp/mibs/CISCO-VOICE-COMMON-DIAL-CONTROL-MIB-V1SMI.my
> /usr/share/snmp/mibs/CISCO-CCM-MIB.my
> /usr/share/snmp/mibs/CISCO-ENTITY-FRU-CONTROL-MIB.my
> /usr/share/snmp/mibs/POWER-ETHERNET-MIB-V1SMI.my
> /usr/share/snmp/mibs/LIEBERT_GP_REG.MIB
> /usr/share/snmp/mibs/LIEBERT_GP_POWER.MIB
> /usr/share/snmp/mibs/ENTITY-SENSOR-MIB-V1SMI.my
> /usr/share/snmp/mibs/CISCO-ENTITY-SENSOR-MIB-V1SMI.my
> /usr/share/snmp/mibs/CISCO-SLB-MIB.my
> /usr/share/snmp/mibs/CISCO-ENHANCED-SLB-MIB.my
> /usr/share/snmp/mibs/EES-power.mib
> 
> 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
> be helpful:
> IMPORTS
> MODULE-IDENTITY,
> OBJECT-TYPE,
> Counter32,
> Gauge32,
> Unsigned32,
> NOTIFICATION-TYPE
> FROM SNMPv2-SMI
> MODULE-COMPLIANCE,
> OBJECT-GROUP,
> NOTIFICATION-GROUP
> FROM SNMPv2-CONF
> TimeStamp,
> DisplayString,
> RowStatus,
> TruthValue,
> RowPointer
> FROM SNMPv2-TC
> SnmpAdminString
> FROM SNMP-FRAMEWORK-MIB
> EntPhysicalIndexOrZero
> FROM CISCO-TC
> ciscoMgmt
> FROM CISCO-SMI;
> 
> 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.
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 6 Oct 2010 17:57:35 +0000
> From: Mike Mitchell <Mike.Mitchell at sas.com>
> Subject: Re: [mrtg] MRTG not honouring mib file
> To: "Babu C" <babscontact at rediffmail.com>, "mrtg at lists.oetiker.ch"
> <mrtg at lists.oetiker.ch>
> Message-ID:
> <F102CE33F23A8849A6CA09E5C620685631D3AF1C at MERCMBX04D.na.SAS.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> I looked at the IMPORTS line in the squid 3.1.8 MIB file and there is nothing there of concern. It is acting more like the MIB file couldn't be read at all. Check the permissions on the file and its directory path. Judging from your example, you're running 'snmpget' as root. Try running 'snmpget' under the same ID as you're running mrtg.
> 
> Here's a small perl script that can be used to test the MIB parser:
> 
> #!/usr/bin/perl
> # change the following line to point to your MRTG library directory
> use lib qw(/usr/local/etc/mrtg/lib/mrtg2)
> use SNMP_util;
> 
> $SNMP_util::Debug = 1;
> foreach $arg (@ARGV) {
> $cnt = SNMP_util::snmpMIB_to_OID($arg);
> print "Loaded $cnt OIDs\n";
> }
> 
> 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
> 
> ________________________________
> From: mrtg-bounces+mike.mitchell=sas.com at lists.oetiker.ch [mrtg-bounces+mike.mitchell=sas.com at lists.oetiker.ch] on behalf of Babu C [babscontact at rediffmail.com]
> Sent: Wednesday, October 06, 2010 6:00 AM
> To: mrtg at lists.oetiker.ch
> Subject: [mrtg] MRTG not honouring mib file
> 
> 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.
> 
> 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 at 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 at 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 I think
> 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?
> 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
> [X]<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101006/f0249460/attachment.htm 
> 
> ------------------------------
> 
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
> 
> 
> End of mrtg Digest, Vol 46, Issue 3
> ***********************************
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101007/f71a2702/attachment-0001.htm 


More information about the mrtg mailing list