mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: snmp cleanup (#4683)
This commit is contained in:
committed by
Neil Lathwood
parent
d9c0614b30
commit
07e8e9f2be
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user