/
Handling Uptime Counter Wrap with snmpEngineTime instead of sysUpTime

Handling Uptime Counter Wrap with snmpEngineTime instead of sysUpTime

Some devices use a 32bit integer for uptime which can cause counter wrapping (after roughly after 497 days).

As a result these devices (when they've been running for long enough) can provide a false reading to NMIS (indeed any SNMP poller).

We can rectify this by editing the model being used for the device and altering the attribute collected for uptime.

By default we retrieve sysUpTime from 1.3.6.1.2.1.1.3.

In the model we will change this to snmpEngineTime from 1.3.6.1.6.3.10.2.1.3.

snmpEngineTime is measured in seconds, where-as sysUpTime is measured in 100th's of a second.

As a consequence we have to multiply the retrieved value by 100.

Your edit of the model should result in the below.

          'sysUpTime' => {
            'oid' => 'snmpEngineTime',
            'title' => 'Uptime',
            'calculate' => '$r * 100'
          },


Once you have made the change, upon the next collect cycle your devices should now have an accurate Uptime.




Related content

NMIS9 Timestamps and their meanings
NMIS9 Timestamps and their meanings
More like this
SNMP Tuning
SNMP Tuning
More like this
SNMP v3 Troubleshooting
SNMP v3 Troubleshooting
More like this
NMIS - Polling Policy - Configuring Variable Polling Polices
NMIS - Polling Policy - Configuring Variable Polling Polices
More like this
Scaling NMIS polling - how NMIS handles long running processes
Scaling NMIS polling - how NMIS handles long running processes
More like this
Tutorial: NMIS8, create a new model (continuation)
Tutorial: NMIS8, create a new model (continuation)
More like this