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

View File

@@ -22,7 +22,11 @@
} elseif($_GET['if']) {
$device_id = getifhost($_GET['if']);
$ifIndex = getifindexbyid($_GET['if']);
} elseif($_GET['peer']) {
$device_id = getpeerhost($_GET['peer']);
}
if($device_id) {
$hostname = gethostbyid($device_id);
}
@@ -71,6 +75,10 @@
case 'unixfs':
$graph = unixfsgraph ($_GET['id'], $graphfile, $from, $to, $width, $height, $title, $vertical);
break;
case 'bgpupdates':
$bgpPeerIdentifier = mysql_result(mysql_query("SELECT bgpPeerIdentifier FROM bgpPeers WHERE bgpPeer_id = '".$_GET['peer']."'"),0);
$graph = bgpupdatesgraph ($hostname . "/bgp-" . $bgpPeerIdentifier . ".rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
break;
case 'calls':
$graph = callsgraphSNOM ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
break;