mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
Removed large unrequired loop.
An example output that shows this is still working: ... snmpOutTraps.0 = 0 snmpEnableAuthenTraps.0 = enabled snmpSilentDrops.0 = 0 snmpProxyDrops.0 = 0 RRD Disabled RRD update /opt/librenms/rrd/xxx/netstats-snmp.rrd N:173688066:172651761:0:50736:0:0:0:0:0:0:0:210621835:0:167870188:2601931:0:0:0:4:74625425:0:0:0:0:0:172651443:0:U:0:0 ... (Note the U 3rd from the end)
This commit is contained in:
@@ -48,16 +48,7 @@ if ($device['os'] != 'Snom') {
|
||||
|
||||
$data_array = snmpwalk_cache_oid($device, 'snmp', array(), 'SNMPv2-MIB');
|
||||
|
||||
$fields = array();
|
||||
foreach ($oids as $oid) {
|
||||
if (is_numeric($data_array[0][$oid])) {
|
||||
$value = $data_array[0][$oid];
|
||||
}
|
||||
else {
|
||||
$value = null;
|
||||
}
|
||||
$fields[$oid] = $value;
|
||||
}
|
||||
$fields = $data_array[0];
|
||||
|
||||
if (isset($data_array[0]['snmpInPkts']) && isset($data_array[0]['snmpOutPkts'])) {
|
||||
if (!file_exists($rrd_file)) {
|
||||
|
||||
Reference in New Issue
Block a user