Open for Voting

False reboot alerts due to SNMP service restart & Proper uptime information

Reboot information is related to SNMP service/daemon. It should not be work like this. SNMP service/daemon can be crashed or restarted for some reason (most of the time). And for that it's not a reliable service for tracking reboots. We need other solution (maybe different OID) for this out of the box. There are plenty of threads about this issue. Some of them are below.

linux snmpd restart during logrotate triggers false reboot alert weekly

Better Method of Calculating Uptime

Re: Misleading SNMP Uptime information
Re: events with "...nodename REBOOTED AT...date time"
Uptime SNMP and reboot messages

is this normal? restart SNMP SERVICE and get a REBOOT event

False Uptime/Reboot readings

Parents Comment Children
  • I doubt that a mere update to net-snmp will change the limitation. The OID for hrSystemUptime is defined as below The value for timeticks is defined as a 32-bit integer (see link to RFC2578 my post above).

    From /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt:

    hrSystemUptime OBJECT-TYPE

        SYNTAX     TimeTicks

        MAX-ACCESS read-only

        STATUS     current

        DESCRIPTION

            "The amount of time since this host was last

            initialized.  Note that this is different from

            sysUpTime in the SNMPv2-MIB [RFC1907] because

            sysUpTime is the uptime of the network management

            portion of the system."

        ::= { hrSystem 1 }

    [ This text is from a net-snmp 5.7.2 install ]

    To redefine the ceiling value of timeticks, the scope/typecast of the definition would need to be changed to something with a higher ceiling value (such as Counter64!).

    Might be better off exploring the "lastboot" SQL posted by stripet @ Nov 18, 2016 12:54 PM. The other alternative might be to run a script upon hitting a particular OID, see here.

    http://net-snmp.sourceforge.net/wiki/index.php/Tut:Extending_snmpd_using_shell_scripts