[mrtg] graphing cisco virtual interface/PPPoE users

Steve Shipway s.shipway at auckland.ac.nz
Wed Feb 3 22:05:35 CET 2010


Jan Wrote:
> Imho the problem is not to trick Mrtg into gathering information based
> on an Alias
> 
> The real problem lies in how to handle different countervalues as I
> don't expect the user to be connected to a reserved virtual interface.

You can always use OIDs to handle different value, this should not be a problem.

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.

> 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).

Patrice wrote:
> > I could change mrtg.cfg before each run but I would like do something
> > more "clean" and if possible limit as much as possible big snmpwalk on
> > our ciscos which have sometimes 400 or 500 virt interface.

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



More information about the mrtg mailing list