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

Marinos Chondrogiannoglou mchon at otenet.gr
Wed Feb 2 08:04:52 CET 2011


On 02/02/2011 12:16 AM, Steve Shipway wrote:
> Marinos said:
>> Yes, I have deleted several times the .ok files, in the next run mrtg
>> creates them again but after a while the errors start again and the .ok
>> files contain the duplicate entries.
> 
> This is odd; are these devices in some way dynamic, reconfiguring on a regular basic?  You might need to use a different way to identify the network interfaces if IP address is not resulting in meaningful data.  Also, try using SNMPv2 and see if this gives a better result (have a :2 on the end of the Target definition where you currently have a :1)
> 
> There is no official way to tell MRTG to NOT cache the interface index table; so we need to find a different way to specify the interface.  If all else fails you can use the interface number although this might produce invalid graphs if the device is reconfiguring numbers at a regular time.
> 
> An unsupported hack that might work is to change the .ok file ownership to root, and set permissions to 0 (no read permission for anyone) and then empty the file -- this SHOULD mean that MRTG is forced to re-query the interface details every pass, but cannot write to the .ok file to cache them.  However it may also result in a few error messages :(, and it will of course not work if you are running MRTG as root (but you're not doing that, are you? :)
> 
> Steve
> 

Hi Steve,

some of them are getting reconfigured quite often but not all of them,
there are devices that stay with the same config for weeks. SNMPv2 is
used in most of the cases (v1 is only used in some low capacity links up
to 2mbits).

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


Thanks again for your help,
Marinos

-- 
**************************
Marinos Chondrogiannoglou
Network Management Center
OTE S.A.
99 Kifisias Av. Marousi
GR-151 24 Athens, HELLAS
PGP Key ID: 0x2EEFC190
**************************



More information about the mrtg mailing list