mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add ability to pass an array of values to rrdtool_update, which are checked and replaced with U if invalid.
git-svn-id: http://www.observium.org/svn/observer/trunk@3152 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -24,8 +24,7 @@ if ($device['os'] != "Snom")
|
||||
|
||||
$data_array = snmpwalk_cache_oid($device, "snmp", array(), "SNMPv2-MIB");
|
||||
|
||||
$rrdupdate = "N";
|
||||
|
||||
$rrdupdate = array();
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
if (is_numeric($data_array[0][$oid]))
|
||||
@@ -34,7 +33,7 @@ if ($device['os'] != "Snom")
|
||||
} else {
|
||||
$value = "U";
|
||||
}
|
||||
$rrdupdate .= ":$value";
|
||||
$rrdupdate[] = $value;
|
||||
}
|
||||
|
||||
if (isset($data_array[0]['snmpInPkts']) && isset($data_array[0]['snmpOutPkts']))
|
||||
|
||||
Reference in New Issue
Block a user