Werk #4567: inventory of interfaces: prevent showing negative last_state_change value

Komponente HW/SW inventory
Titel inventory of interfaces: prevent showing negative last_state_change value
Datum 09.05.2017
Checkmk Edition Checkmk Raw (CRE)
Checkmk-Version 1.5.0i1
Level Bedeutende Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen

On SNMP devices sysUpTime is a 32-bit counter and will roll over after 496 days. ifLastChange is the timestamp from sysUpTime when the state changed. At inventory time we got a negative value if sysUpTime was smaller then ifLastChange (because it rolled over) using the normal formula. If sysUpTime is smaller than ifLastChange we add 496 days for the rollover now.

When the device reboots all last_state_change values are set to 0 by the device so those cases are not affected by the fix..

Beware there's no way to get the count of times the sysUpTime counter rolled over so the last_state_change is not accurate in case it's in real more than 496 days ago. ...but this situation has never been different. This fix just removes another error in shown values.

Zur Liste aller Werks