git-svn-id: http://www.observium.org/svn/observer/trunk@443 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-08-07 11:53:10 +00:00
parent 1ea54588eb
commit 04060b965d
11 changed files with 567 additions and 599 deletions

View File

@@ -8,7 +8,7 @@
$as_cmd .= ".1.3.6.1.2.1.15.2";
$bgpLocalAs = trim(shell_exec($as_cmd));
if($bgpLocalAs && !strstr($bgpLocalAs, "No")) {
if($bgpLocalAs && !strstr($bgpLocalAs, " ")) {
echo("AS$bgpLocalAs \n");
@@ -65,7 +65,12 @@
echo("\n");
} # If Peer
} # Foreach
} else { echo("No BGP on host"); } # End if
} else {
echo("No BGP on host");
if($device['bgpLocalAs']) {
mysql_query("UPDATE devices SET bgpLocalAs = NULL WHERE device_id = '".$device['device_id']."'"); echo(" (Removed ASN)\n");
} # End if
} # End if
## Delete removed peers

View File

@@ -731,6 +731,7 @@ function pktsgraph ($rrd, $graph, $from, $to, $width, $height) {
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = $config['install_dir'] . "/graphs/" . "$graph";
$options = "--alt-autoscale-max -E --start $from --end $to --width $width --height $height ";
if($height < "99") { $options .= " --only-graph"; unset ($legend); }
if($width <= "300") { $options .= " --font LEGEND:7:".$config['mono_font']." --font AXIS:6:".$config['mono_font']." --font-render-mode normal "; }
$options .= " DEF:in=$database:INUCASTPKTS:AVERAGE";
$options .= " DEF:out=$database:OUTUCASTPKTS:AVERAGE";
@@ -755,6 +756,7 @@ function errorgraph ($rrd, $graph, $from, $to, $width, $height) {
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = $config['install_dir'] . "/graphs/" . "$graph";
$options = "--alt-autoscale-max -E --start $from --end $to --width $width --height $height ";
if($height < "99") { $options .= " --only-graph"; unset ($legend); }
if($width <= "300") { $options .= " --font LEGEND:7:".$config['mono_font']." --font AXIS:6:".$config['mono_font']." --font-render-mode normal "; }
$options .= " DEF:in=$database:INERRORS:AVERAGE";
$options .= " DEF:out=$database:OUTERRORS:AVERAGE";
@@ -779,6 +781,7 @@ function nucastgraph ($rrd, $graph, $from, $to, $width, $height) {
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = $config['install_dir'] . "/graphs/" . "$graph";
$options = "--alt-autoscale-max -E --start $from --end $to --width $width --height $height ";
if($height < "99") { $options .= " --only-graph"; unset ($legend); }
if($width <= "300") { $options .= " --font LEGEND:7:".$config['mono_font']." --font AXIS:6:".$config['mono_font']." --font-render-mode normal "; }
$options .= " DEF:in=$database:INNUCASTPKTS:AVERAGE";
$options .= " DEF:out=$database:OUTNUCASTPKTS:AVERAGE";