fixes to many little things. collection of ospf neighbours (but we can't definitely work out what interface they're on, fucking mib is lame!)

git-svn-id: http://www.observium.org/svn/observer/trunk@2210 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-30 22:20:11 +00:00
parent 965db1b350
commit 8e9f47f2b9
12 changed files with 146 additions and 31 deletions

View File

@@ -17,6 +17,8 @@ while($instance = mysql_fetch_assoc($query))
$area_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_areas` WHERE `device_id` = '".$device['device_id']."'"),0);
$port_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_ports` WHERE `device_id` = '".$device['device_id']."'"),0);
$port_count_enabled = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_ports` WHERE `ospfIfAdminStat` = 'enabled' AND `device_id` = '".$device['device_id']."'"),0);
$nbr_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_nbrs` WHERE `device_id` = '".$device['device_id']."'"),0);
$query = "SELECT * FROM ipv4_addresses AS A, ports AS I WHERE ";
$query .= "(A.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND I.interface_id = A.interface_id)";
@@ -35,7 +37,7 @@ while($instance = mysql_fetch_assoc($query))
echo(' <td>' . $asbr . '</td>');
echo(' <td>' . $area_count . '</td>');
echo(' <td>' . $port_count . '('.$port_count_enabled.')</td>');
echo(' <td>' . ($neighbour_count+0) . '</td>');
echo(' <td>' . $nbr_count . '</td>');
echo('</tr>');
echo('<tr bgcolor="'.$instance_bg.'">');