Skip to content

Commit

Permalink
fix: ubnt bad edgeswitch uptime #4470
Browse files Browse the repository at this point in the history
fix: ubnt bad edgeswitch uptime #4470
  • Loading branch information
laf committed Sep 18, 2016
2 parents b8d0852 + 2c5bd40 commit ff99f4f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions includes/polling/core.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
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)) {
Expand Down

0 comments on commit ff99f4f

Please sign in to comment.