mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
don't try to add bogus addresses then remove them again + small fixes and REMOVE DEBUG PRINT_R
git-svn-id: http://www.observium.org/svn/observer/trunk@3007 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
echo("IPv4 Addresses : ");
|
||||
|
||||
$oids = trim(snmp_walk($device,"ipAdEntIfIndex","-Osq","IP-MIB"));
|
||||
$oids = str_replace("ipAdEntIfIndex.", "", $oids);
|
||||
$oids = trim(str_replace("ipAdEntIfIndex", "", $oids),'.');
|
||||
foreach (explode("\n", $oids) as $data)
|
||||
{
|
||||
$data = trim($data);
|
||||
|
@@ -38,9 +38,6 @@ if ($device['os'] != "Snom")
|
||||
$rrdupdate .= ":$value";
|
||||
}
|
||||
|
||||
print_r($data);
|
||||
|
||||
|
||||
if (isset($data[0]['ipOutRequests']) && isset($data[0]['ipInReceives']))
|
||||
{
|
||||
if (!file_exists($rrd_file)) { rrdtool_create($rrd_file, $rrd_create); }
|
||||
@@ -48,7 +45,6 @@ if ($device['os'] != "Snom")
|
||||
$graphs['netstat_ip'] = TRUE;
|
||||
$graphs['netstat_ip_frag'] = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
unset($oids, $data, $data_array, $oid);
|
||||
|
@@ -143,7 +143,8 @@ foreach ($port_stats as $ifIndex => $port)
|
||||
$ports[$ifIndex]['deleted'] = "0";
|
||||
}
|
||||
} else {
|
||||
if($ports[$port['ifIndex']]['deleted'] != "1") {
|
||||
if ($ports[$port['ifIndex']]['deleted'] != "1")
|
||||
{
|
||||
dbUpdate(array('deleted' => '1'), 'ports', '`interface_id` = ?', array($ports[$ifIndex]['interface_id']));
|
||||
$ports[$ifIndex]['deleted'] = "1";
|
||||
}
|
||||
|
Reference in New Issue
Block a user