mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
fix problem with snmp_get_multi
git-svn-id: http://www.observium.org/svn/observer/trunk@3163 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -53,7 +53,13 @@ function snmp_get_multi($device, $oids, $options = "-OQUs", $mib = NULL, $mibdir
|
||||
$runtime_stats['snmpget']++;
|
||||
foreach (explode("\n", $data) as $entry)
|
||||
{
|
||||
$array[$index][$oid] = $value;
|
||||
list($oid,$value) = explode("=", $entry);
|
||||
$oid = trim($oid); $value = trim($value);
|
||||
list($oid, $index) = explode(".", $oid);
|
||||
if (!strstr($value, "at this OID") && isset($oid) && isset($index))
|
||||
{
|
||||
$array[$index][$oid] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
|
||||
Reference in New Issue
Block a user