Opened 13 years ago

Closed 12 years ago

Last modified 10 years ago

#69 closed defect (fixed)

Not parsing MIB Files (2 name spaces - Net_SNMP_util::MIB_Files and SNMP_util::MIB_Files)

Reported by: human Owned by: somebody
Version: 2.x Keywords:
Cc: poller@…

Description

I was running MRTG 2.16.2 happily for years on a Sparc/Solaris? 10 system. I recently ported my config over to an Intel/Fedora? 10 release. As a result, my Perl moved from 5.8.8 to 5.10.0.

My mrtg configuration polls data from a squid proxy. This was working correctly under the Solaris system, but failed under the new Fedora 10/Perl 5.10.0 release.

I traced it down to mrtg not reading the mib file. This seems to be because there are 2 almost identical name spaces: Net_SNMP_util and SNMP_util. Both name spaces have identical routines: snmpQueue_MIB_File which puts the name of the mib file on a queue called Net_SNMP_util::MIB_File and SNMP_util::MIB_File.

In my FC10/Perl 5.10.0 installation, only Net_SNMP_util::snmpQueue_MIB_File is called, and thus, only Net_SNMP_util::MIB_File is populated. As a result, mrtg fails when parsing the config files that specify OIDs/names from the mib file.

I made a one line change to fix this in my version. In Net_SNMP_util::snmpQueue_MIB_File, I push the mib file onto the queue in both name spaces:

sub snmpQueue_MIB_File (@) {

my(@files) = @_; my($file);

$Net_SNMP_util::ErrorMessage? = ; foreach $file (@files) {

push(@Net_SNMP_util::MIB_Files, $file); push(@SNMP_util::MIB_Files, $file);

}

}

Change History (2)

Note: See TracTickets for help on using tickets.
 

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example.