[mrtg] MRTG not honouring mib file

Babu C babscontact at rediffmail.com
Sat Oct 9 06:27:00 CEST 2010


Sorry I think I received the unmodified SNMP_util.pm I suppose as I 
couldnt find the changes in the file I received. Could you verify this 
and send me the modified SNMP_util file?
Regarding LoadMIBs, I have only one statement in the mrtg.cfg file and 
its loading only one mib file

Thanx & regards
Babs


On Sat, 09 Oct 2010 01:44:29 +0530  wrote
>

I added three print statements to the "snmpMIB_to_OID" function in 
SNMP_util.pm.

On line 1197, change

 print "snmpMIB_to_OID: opening $arg\n" if ($arg =~ /squid/i);

to

 print "snmpMIB_to_OID: opening $arg\n";



and copy the new version to the

 /usr/local/lib/perl5/site_perl/5.10.1/SNMP_util.pm

 /usr/ports/net-mgmt/p5-SNMP_Session/work/SNMP_Session-
1.12/lib/SNMP_util.pm

 /usr/ports/net-mgmt/p5-SNMP_Session/work/SNMP_Session-
1.12/blib/lib/SNMP_util.pm

locations and try running mrtg again. It should print out any MIB file 
it tries to load.



Do you have multiple 'LoadMibs:' directives in your configuration? It's 
possible mrtg is only using the last one. If you have multiple MIB 
files to load you can list them all on one line, separated by a comma.



Mike Mitchell



From: Babu C [babscontact at rediffmail.com]

Sent: Thursday, October 07, 2010 11:57 PM

To: Mike Mitchell

Cc: mrtg at lists.oetiker.ch

Subject: Re: RE: RE: [mrtg] MRTG not honouring mib file









On Fri, 08 Oct 2010 03:14:01 +0530 wrote

>>>

>

>I'm including a replacement for your SNMP_util.pm file.

>

>It sounds like it goes in your /usr/local/lib/perl5/site_perl/5.10.1

>

>directory, but I'm not sure. Search your filesystem for a file named 

>'SNMP_util.pm' and replace all copies with the one I'm including.

>

>

>

>I've added a few diagnostic lines that will trigger when a MIB file 

>with 'squid' in its name is loaded.

>

>

>

>Please use the replacement SNMP_util.pm file and send me the result of 

>an mrtg run that uses the squid MIB file.

>

>

>

>Mike Mitchell 



Hi Mike,

Thank you so much for the reply, I replaced my SNMP_util.pm file with 

the one you send it across and I found no changes at all in mrtg log. 

So its almost clear now that the LoadMIBs doesn't touch the squid.mib 

file at all.

Below are the log details



010-10-08 09:44:11 -- Started mrtg with config 

'/usr/local/etc/mrtg/mrtg.cfg'

2010-10-08 09:44:11 -- Unknown SNMP var cacheHttpHits

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheServerRequests

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheUptime

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheSoftware

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheVersionId

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Use of uninitialized value $ret[-2] in 

concatenation (.) or string at /usr/local/bin/mrtg line 2261.

2010-10-08 09:44:11 -- Use of uninitialized value $ret[-1] in 

concatenation (.) or string at /usr/local/bin/mrtg line 2261.

2010-10-08 09:44:11 -- Unknown SNMP var cacheServerInKb

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheServerOutKb

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheUptime

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheSoftware

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Unknown SNMP var cacheVersionId

at /usr/local/bin/mrtg line 2242

2010-10-08 09:44:11 -- Use of uninitialized value $ret[-2] in 

concatenation (.) or string at /usr/local/bin/mrtg line 2261.

2010-10-08 09:44:11 -- Use of uninitialized value $ret[-1] in 

concatenation (.) or string at /usr/local/bin/mrtg line 2261.

2010-10-08 09:44:11 -- 2010-10-08 09:44:11: ERROR: Target[proxy-

hit][_IN_] ' $target->[0]{$mode} ' did not eval into defined data

2010-10-08 09:44:11 -- 2010-10-08 09:44:11: ERROR: Target[proxy-

hit][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data

2010-10-08 09:44:11 -- 2010-10-08 09:44:11: ERROR: Target[proxy-

srvkbinout][_IN_] ' $target->[1]{$mode} ' did not eval into defined 

data

2010-10-08 09:44:11 -- 2010-10-08 09:44:11: ERROR: Target[proxy-

srvkbinout][_OUT_] ' $target->[1]{$mode} ' did not eval into defined 

data



Where I have SNMP_util.pm files



testmc# find / -name SNMP_util.pm

/usr/local/lib/perl5/site_perl/5.10.1/SNMP_util.pm

/usr/ports/net-mgmt/p5-SNMP_Session/work/SNMP_Session-

1.12/lib/SNMP_util.pm

/usr/ports/net-mgmt/p5-SNMP_Session/work/SNMP_Session-

1.12/blib/lib/SNMP_util.pm

/usr/home/babs/SNMP_util.pm





Also the top portion of mrtg.cfg 



testmc# head -4 /usr/local/etc/mrtg/mrtg.cfg

EnableIPv6: no

WorkDir: /usr/local/www/apache22/data

Options[_]: bits,growright

LoadMIBs: /usr/local/etc/mrtg/squid.mib





May be these things may help you, I suppose?



Still scratching my head to get a clue



With thanx & regards

Babs























-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101009/1c03d16d/attachment.htm 


More information about the mrtg mailing list