hrSystemUptime
on windows system, because really there incorrect uptime.
OK, I've worked out what the problem was with Windows Server 2012R2, simple really and problem is easily and reliably repeatable.
On Windows Server:-
SNMPv2-MIB::sysUpTime.0 is reset when the SNMP service restarts.
HOST-RESOURCES-MIB::hrSystemUptime.0 is reset when the server hardware is rebooted.
So, if you're playing with the SNMP service as I was yesterday and repeatedly restarting the SNMP Service, the two OIDs return completely different values and Observium reports "System Rebooted" each time the SNMP service is restarted. In normal circumstances you wouldn't likely need to restart the SNMP service too often, so this issue wouldn't reveal itself.
When you reboot the system, then the OIDs will return values that are very close, but not identical. HOST-RESOURCES-MIB::hrSystemUptime.0 is always greater than SNMPv2-MIB::sysUpTime.0 as one would expect, as the SNMP service starts some small delay after the server hardware.
Despite what Mike said yesterday, at least for the two Windows Servers I am monitoring, Observium CE is definitely displaying the Uptime and Last Reboot based on SNMPv2-MIB::sysUpTime.0 and doesn't appear to take the larger of the two, see below for evidence.
Looks to me like the algorithm that is comparing the 4 values Mike mentioned in his original reply is failing somehow. I tried the poller.php debug output Mike suggested. It produces a lot of data. I can post this, but as I'm new to this maillist, please advise the best way to do it. Inline, attachment or link to Dropbox/Google Drive?
Currently:-
SNMPv2-MIB::sysUpTime.0 = Timeticks: (155746) 0:25:57.46 (SNMP Service restarted 25 minutes prior to SNMPGET)
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (6491382) 18:01:53.82 (Hardware rebooted 18 hours prior to SNMPGET)
Observium CE GUI shows:-
Uptime 22m 24s (difference in time from above values due to 5 minute polling interval)
Last reboot 2019-05-25 16:08:07 (Server was actually last rebooted 2019-05-24 22:06:00 NZST)
Current Localtime = Sat May 25 16:36:45 NZST 2019
There are some slight discrepancies in figures due to the time taken to perform the tests and "copy & paste" the results. Time waits for no one!! :-)
As regards the Tycon Voltage monitor, this is likely just a poor SNMP implementation which is crashing and restarting, but the device itself is OK. As this device only returns one uptime value, there is no way to handle this in Observium.
Regards
Chris Macneill
Web: www.cmit.nz
_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium