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:
David Bell
2016-04-19 16:04:24 +01:00
parent 933e163222
commit 761f55b8db
+1 -10
View File
@@ -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)) {