mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: ubnt bad edgeswitch uptime #4470
fix: ubnt bad edgeswitch uptime #4470
This commit is contained in:
@@ -39,13 +39,15 @@ if (empty($uptime)) {
|
||||
echo 'Using hrSystemUptime ('.$uptime."s)\n";
|
||||
} else {
|
||||
$uptime = floor($poll_device['sysUpTime'] / 100);
|
||||
echo 'Using SNMP Agent Uptime ('.$uptime."s)\n";
|
||||
echo 'Using SNMP Agent Uptime ('.$uptime."s)\n ";
|
||||
}//end if
|
||||
}//end if
|
||||
|
||||
if ($snmp_uptime > $uptime && is_numeric($snmp_uptime)) {
|
||||
$uptime = $snmp_uptime;
|
||||
d_echo('hrSystemUptime or sysUpTime looks like to have rolled, using snmpEngineTime instead');
|
||||
if ($device["os"] != "edgeswitch") {
|
||||
if ($snmp_uptime > $uptime && is_numeric($snmp_uptime)) {
|
||||
$uptime = $snmp_uptime;
|
||||
d_echo('hrSystemUptime or sysUpTime looks like to have rolled, using snmpEngineTime instead');
|
||||
}
|
||||
}
|
||||
|
||||
if (is_numeric($uptime)) {
|
||||
|
||||
Reference in New Issue
Block a user