[mrtg] graphing cisco virtual interface/PPPoE users

Patrice Blot - FCNET blot at fcnet.fr
Mon Feb 8 17:17:27 CET 2010

Hi steve and Jan,

You both are right.
My comments below.

> What I thought was the issue (correct me if Im wrong) was that Patrice
> is trying to create a MRTG graph per user, although which interface
> corresponds to the user will change and can only be identified via the
> ifAlias.  Since MRTG does not allow identification of interfaces via
> ifAlias, this cannot be done.

Right. this is what I want to do. 
For example for my own ADSL connection my radius reply to my cisco : cisco-avpair =="lcp:interface-config=descr blot"

And snmpwalk gives for my Iface :
IF-MIB::ifIndex.92 = INTEGER: 92
IF-MIB::ifDescr.92 = STRING: Virtual-Access87
IF-MIB::ifType.92 = INTEGER: ppp(23)
IF-MIB::ifMtu.92 = INTEGER: 1464
IF-MIB::ifSpeed.92 = Gauge32: 608000
IF-MIB::ifPhysAddress.92 = STRING:
IF-MIB::ifAdminStatus.92 = INTEGER: up(1)
IF-MIB::ifOperStatus.92 = INTEGER: up(1)
IF-MIB::ifLastChange.92 = Timeticks: (69431785) 8 days, 0:51:57.85
IF-MIB::ifInOctets.92 = Counter32: 364474592
IF-MIB::ifOutOctets.92 = Counter32: 1798235934
IF-MIB::ifName.92 = STRING: Vi87
IF-MIB::ifAlias.92 = STRING: blot

This is what is great ->>>>>>^^^^

> > Besides I can't see how mrtg should be able to obtain ifnumber based
> on
> > ifDescr or ifAlias other than listing the interfaces. And you don't
> need
> > to list (snmpwalk) more than the right table.
> This is actually how MRTG does it for all other ways of identifying the
> interface, and caches information in the .ok file (sometimes).

You're right. There is an mrt.ok file by me which contains these information. I never pay attention to it.

> You shouldn't rewrite mrtg.cfg as this would be needlessly complex.  A
> far better solution would be to write a data collection plugin that
> identifies the correct interface from a passed username parameter, and
> retrieves the appropriate counters.  You should probably make this
> plugin cache the snmpwalk output for a certain period (at least 5min)
> in order to have efficiency - just as MRTG does with its other checks.
> > > So to my mind it should be a very small development to make MRTG
> uses
> > > "IF-MIB::ifAlias" to reference a target like "IF-MIB::ifDescr" is
> > > already used.
> I generally agree, although I think it would be slightly more complex
> to use the vendor-MIBs to identify interfaces.  You'd also need to add
> a new identifier syntax to the Target definition and extend the caching
> of data  (eg: Target[]: ~alias:community at host ).  If you do this,
> please modify the latest MRTG, and pass the patch back to Tobi for
> inclusion into the official code.
> Steve

According to your advices I think I will keep working in 2 directions :
- writing plugin
- hacking mrtg code. Really more complex. Need to grab new OID,add new syntax to mrtg.cfg, new cache to mrtg.ok. Will see !

More news in a few weeks or months due to the small priority affected to this project :(

Thanks for you precious advices,


More information about the mrtg mailing list