Add BGP detection and polling. Fix a lot of other things.

git-svn-id: http://www.observium.org/svn/observer/trunk@161 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-15 17:58:15 +00:00
parent 935744d1ed
commit 190f5ee2ce
15 changed files with 259 additions and 57 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ while ($device = mysql_fetch_array($q)) {
echo("Create Subnet $network\n");
}
$network_id = mysql_result(mysql_query("SELECT id from `networks` WHERE `cidr` = '$network'"), 0);
if (match_network($nets, $address) && mysql_result(mysql_query("SELECT COUNT(*) FROM `adjacencies` WHERE `network_id` = '$network_id' AND `interface_id` = '$interface_id'"), 0) < '1') {
if (match_network($config['nets'], $address) && mysql_result(mysql_query("SELECT COUNT(*) FROM `adjacencies` WHERE `network_id` = '$network_id' AND `interface_id` = '$interface_id'"), 0) < '1') {
mysql_query("INSERT INTO `adjacencies` (`network_id`, `interface_id`) VALUES ('$network_id', '$interface_id')");
echo("Create Adjacency : $hostname, $interface_id, $network_id, $network, $ifIndex\n");
}