move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.

git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-05-16 13:25:50 +00:00
parent 2e2379a8a1
commit 4db1454e92
100 changed files with 525 additions and 928 deletions
+3 -3
View File
@@ -86,9 +86,9 @@ if (isset($port_stats[$port['ifIndex']]['adslLineCoding']))
$this_port[$oid] = $this_port[$oid] / 10;
}
if (dbFetchCell("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = ?", array($port['interface_id'])) == "0")
if (dbFetchCell("SELECT COUNT(*) FROM `ports_adsl` WHERE `port_id` = ?", array($port['port_id'])) == "0")
{
dbInsert(array('interface_id' => $port['interface_id']), 'ports_adsl');
dbInsert(array('port_id' => $port['port_id']), 'ports_adsl');
}
$port['adsl_update'] = array('port_adsl_updated' => array('NOW()'));
@@ -97,7 +97,7 @@ if (isset($port_stats[$port['ifIndex']]['adslLineCoding']))
$data = str_replace("\"", "", $this_port[$oid]); ## FIXME - do we need this?
$port['adsl_update'][$oid] = $data;
}
dbUpdate($port['adsl_update'], 'ports_adsl', '`interface_id` = ?', array($port['interface_id']));
dbUpdate($port['adsl_update'], 'ports_adsl', '`port_id` = ?', array($port['port_id']));
if ($this_port['adslAtucCurrSnrMgn'] > "1280") { $this_port['adslAtucCurrSnrMgn'] = "U"; }
if ($this_port['adslAturCurrSnrMgn'] > "1280") { $this_port['adslAturCurrSnrMgn'] = "U"; }