[mrtg] MRTG draws wrong when the traffic arrive 100 ~110 Mbit...

Daniel J McDonald dan.mcdonald at austinenergy.com
Fri Mar 30 14:04:27 CEST 2007

On Fri, 2007-03-30 at 10:37 +0200, Koelstra, J. (Jan) wrote:
> Tobi,
> Basically I like cfgmaker always to check for the ifHC* counters.

I'm doing a bit of hacking on cfgmaker right now.  Once I run a few more
tests I will submit the code.  I'd love to have a few other testers
before I call it good.

One of the issues I've had to deal with is snmp V3 fallback when ifHC*
is missing.  Unlike snmp v2c and snmp v1, v3 uses a completely different
authentication method, so just checking the version is not enough.

My solution is to add a new per-interface directive, noHC[].  noHC[] is
added by cfgmaker to signal that ifInOctects and ifOutOctets should be
polled instead of their ifHC* counterparts, irrespective of the version
of code used.  The code is backward compatible, so the existing behavior
will function properly as well.  The name is not terribly intuitive, so
I would appreciate suggestions on a better name (LowSpeed[] might be
better, or at least more obvious).  This works fine for V3 and V2c
fallbacks, so if you have an obscure need to poll ifInOctets using V2c
(perhaps you have limited the snmp versions that can transit your
firewall) the generated config will work properly.

> Right now the v2 option is needed to get these counters, so without
> too much thinking I suggested the snmpv2 as default for cfgmaker.

Well, how do you do the test?  Do you assume that the lowest numbered
interface is valid and test it?  or do you run double tests on every
interface?  And what does the config look like - do you just append :2 
at the appropriate location in the connect string, or do you make mrtg
determine the status on the fly?

An alternative, that would not be overly onerous, would be to perform a
test on the lowest numbered interface, and if HC counters are present,
then report on standard out: "$target supports highspeed counters.  To
use highspeed counters, re-run configmaker with the following line:..."

Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
Austin Energy

More information about the mrtg mailing list