[mrtg] Problem with mrtg and snmp version 2

McDonald, Dan Dan.McDonald at austinenergy.com
Fri Feb 20 15:53:07 CET 2009


On Fri, 2009-02-20 at 15:24 +0100, Håkan Lindholm wrote:
> Sorry for pulling up an old thread again..
> 
> 2008/3/20 Daniel J McDonald <dan.mcdonald at austinenergy.com>:
> >
> > On Tue, 2008-03-18 at 16:37 -0600, Karina Gómez wrote:
> >> ifInOctets.2&ifOutOctets.2:Canopy at 192.168.13.49:::::2
> >>
> >> isn't activated with that last 2 ?
> >
> > Yes, but until 2.15.2, if it detected from ifHighSpeed that the 64 bit
> > counters were not used, then it would drop back to snmp V1 and use
> > ifInOctets and ifOutOctets.

> $> snmpwalk -v2c -c public kp-sw-01 ifSpeed.1001
> IF-MIB::ifSpeed.1001 = Gauge32: 1000000000
> $> snmpwalk -v2c -c public kp-sw-01 ifHighSpeed.1001
> IF-MIB::ifHighSpeed.1001 = Gauge32: 0
> $> snmpwalk -v2c -c public kp-sw-01 ifHCInOctets.1001
> IF-MIB::ifHCInOctets.1001 = Counter64: 203087599517594

> I want to use the ifHCInOctets because they are 64bit.
> Too bad the ifHighSpeed is not set.
> ifHCInOctets is obviously there.

> Would it be able to make cfgmaker support this scenario as well?

Something would need to be added around line 906, such as:
if (not $speed) {
  my $lowspeed = (snmpget($snmphost, $v3opt, 'ifSpeed.'.$if))[0];
  debug('base',"snmpget $snmphost for ifSpeed.$if -> $lowspeed b/s");
  if ($lowspeed > 100000000 and $counter >0) {
	$speed = $lowspeed / 1000000;
	debug('base',"check for ifHighSpeed failed but ifHC counters present, using ifHC counters");
  }
}




> Best regards
> Hakan Lindholm
-- 
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090220/7e489df7/attachment.bin 


More information about the mrtg mailing list