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.