refactor: snmp cleanup (#4683)

This commit is contained in:
Tony Murray
2016-10-06 15:20:11 -05:00
committed by Neil Lathwood
parent d9c0614b30
commit 07e8e9f2be
9 changed files with 114 additions and 199 deletions

View File

@@ -15,14 +15,14 @@ if ($device['os_group'] == "cisco") {
// Total
$total = 0;
foreach (snmpwalk_cache_oid_num($device, "1.3.6.1.4.1.9.9.86.1.2.1.1.6", null) as $key => $value) {
$total += $value[''];
$total += $value;
}
if (isset($total) && ($total != "") && ($total != 0)) {
// Active
$active = 0;
foreach (snmpwalk_cache_oid_num($device, "1.3.6.1.4.1.9.9.86.1.2.1.1.7", null) as $key => $value) {
$active += $value[''];
$active += $value;
}
$rrd_def = array(