[mrtg] graphing cisco virtual interface/PPPoE users

Steve Shipway s.shipway at auckland.ac.nz
Tue Apr 6 06:41:12 CEST 2010


Khem wrote:
>My work around may not be a good solution for you but i'd like to
present it here in the purpose that it may give you some ideas to start
with. My approach was to re-generate the config file mrtg.cfg every 5
minutes and schedule it to start just before the mrtg command in the
crontab.

While this method would work, I think a much more effective way to achieve this would be to write a custom data collection plugin that could be called by MRTG.  This plugin could walk the OID tree on the device, and identify the traffic ocunters for an interface as identified by a username passed as a parameter.

We have done something similar to monitor our Foundry switch - the name of a virtual interface is passed as a parameter, and the plugin identifies the appropriate counters form this information, then outputs them.

Possibly a bit more coding work, but certainly more efficient and reliable in the long run?  You also avoid all the race conditions implicit in re-creating the cfg file -- and note that if you use daemon mode, recreating the cfg file will not work since the cfg files are then only read in once at the start.

Steve


More information about the mrtg mailing list