[mrtg] Can not determine ifNumber and duplicate entries of IP-Ifindex at the .ok files

Steve Shipway s.shipway at auckland.ac.nz
Wed Feb 2 08:59:26 CET 2011


>About the permissions hack, I'm afraid that if mrtg is not caching the
>polling time will go way of the 5mins (it happened when I removed all
>the .ok files at some point).

The .ok files do not cache the polling time, they only cache the interface identifiers.  When the .ok file is unavailable or empty, MRTG will walk the IF-MIB tree to read all the interface details which it then caches in the .ok file for next time (if it can) and it uses the interface details to map a reference (eg IP address) to an interface number.

The polling time is handled by your scheduler (if you use a cron-based system) or by MRTG's own internal scheduler, which is based on the system clock, if you use daemon mode.

Since your system works for a bit and then goes wrong, my guess is that something is causing a periodic reconfiguration of your underlying Serial interfaces and subinterfaces.  The only way to verify this would be to take an SNMP walk of the IF-MIB now, remove the .ok file and let the system work for a bit, and when itnext goes wrong take another SNMP walk and compare the two.  If they dont match, then you're getting reconfiguration. 

Another possible solution would be to use a scheduler to regularly (daily?  weekly?) call cfgmaker and re-generate your .cfg files.  This would get around any problem with the configuration altering, though if you are using daemon mode you'd need to make sure you either restart the daemon or have MRTG 2.17 (which re-reads a changed config file)

Steve


Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz
Ph: +64 9 373 7599 ext 86487






More information about the mrtg mailing list