Ticket #33 (closed defect: fixed)
cfgmaker in 2.15.2 improperly adding nohc:yes
| Reported by: | human | Owned by: | somebody |
|---|---|---|---|
| Version: | Keywords: | cfgmaker nohc | |
| Cc: |
Description
With the --snmp-options=:::::2 option in cfgmaker, the resulting cfg file has nohc[...]: yes specified for each interface even though the device supports ifHC counters. Cisco 7606 IOS 12.2(18) and Catalyst 6513 CatOS 8.4(5) have worked fine with v2 64-bit counters in previous versions of mrtg.
Change History
comment:2 Changed 21 months ago by human
In version 2.16.2, I am seeing this bug for a different reason: On a Cisco 6500 platform (version 12.2(33)SXI3), the unrouted-VLAN-xyz interfaces return a speed of zero for both the ifSpeed and ifHighSpeed subtrees. This is causing cfgmaker to switch to the SNMPv1 counters for these interfaces.
Here is my modified version of line 907 in cfgmaker:
if((!defined $speed) or $counter eq "" or $counter !~ /\d/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage?){


I see this in 2.16.2 when polling 64 bit counters. Running cfgmaker with debug on shows InHCInOctets counter being prefixed with a "+".
Changing line 907 of cfgmaker resolves this issue for me.
$ diff cfgmaker.2162.orig cfg_test 907c907 < if(not $speed or $counter eq "" or $counter =~ /\D/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage){ --- > if(not $speed or $counter eq "" or $counter !~ /\d/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage){