fix: Stop openbsd using snmpEngineTime (#5111)

This commit is contained in:
Neil Lathwood
2016-12-08 04:10:57 +00:00
committed by Tony Murray
parent f7d80202e7
commit a984c67f98
2 changed files with 16 additions and 14 deletions

View File

@@ -286,9 +286,10 @@ $config['os'][$os]['group'] = 'unix';
$config['os'][$os]['text'] = 'pfSense';
$os = 'openbsd';
$config['os'][$os]['type'] = 'server';
$config['os'][$os]['group'] = 'unix';
$config['os'][$os]['text'] = 'OpenBSD';
$config['os'][$os]['type'] = 'server';
$config['os'][$os]['group'] = 'unix';
$config['os'][$os]['text'] = 'OpenBSD';
$config['os'][$os]['bad_snmpEngineTime'] = true;
$os = 'netbsd';
$config['os'][$os]['type'] = 'server';
@@ -1858,16 +1859,17 @@ $config['os'][$os]['over'][2]['text'] = 'Memory Usage';
// UBNT EdgeSwitch 750W
$os = 'edgeswitch';
$config['os'][$os]['text'] = 'EdgeSwitch';
$config['os'][$os]['type'] = 'network';
$config['os'][$os]['icon'] = 'ubiquiti';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$config['os'][$os]['ifname'] = 1;
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
$config['os'][$os]['over'][1]['text'] = 'CPU Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
$config['os'][$os]['text'] = 'EdgeSwitch';
$config['os'][$os]['type'] = 'network';
$config['os'][$os]['icon'] = 'ubiquiti';
$config['os'][$os]['ifname'] = 1;
$config['os'][$os]['bad_snmpEngineTime'] = true;
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
$config['os'][$os]['over'][1]['text'] = 'CPU Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
// Fiberhome
$os = 'fiberhome';

View File

@@ -43,7 +43,7 @@ if (empty($uptime)) {
}//end if
}//end if
if ($device["os"] != "edgeswitch") {
if ($config['os'][$device['os']]['bad_snmpEngineTime'] !== true) {
if ($snmp_uptime > $uptime && is_numeric($snmp_uptime)) {
$uptime = $snmp_uptime;
d_echo('hrSystemUptime or sysUpTime looks like to have rolled, using snmpEngineTime instead');