apache graph improvements. bytes => bits

git-svn-id: http://www.observium.org/svn/observer/trunk@2667 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-10-07 19:48:15 +00:00
parent 8919430912
commit 28a7ba8de7
5 changed files with 22 additions and 11 deletions

View File

@@ -19,8 +19,10 @@ $colour_line = "006600";
$colour_area_max = "FFEE99";
$graph_max = 1;
$multiplier = 8;
$unit_text = "KByte/sec";
$unit_text = "Kbps";
include("includes/graphs/generic_simplex.inc.php");

View File

@@ -13,8 +13,8 @@ if (is_file($apache_rrd))
$ds = "cpu";
$colour_area = "AA66AA";
$colour_line = "FFDD88";
$colour_area = "F0E68C";
$colour_line = "FF4500";
$colour_area_max = "FFEE99";

View File

@@ -13,8 +13,8 @@ if (is_file($apache_rrd))
$ds = "access";
$colour_area = "AA66AA";
$colour_line = "FFDD88";
$colour_area = "B0C4DE";
$colour_line = "191970";
$colour_area_max = "FFEE99";

View File

@@ -8,8 +8,17 @@ include("includes/graphs/common.inc.php");
$unit_text = str_pad(truncate($unit_text,18,''),18);
$line_text = str_pad(truncate($line_text,12,''),12);
$rrd_options .= " DEF:".$ds."=".$rrd_filename.":".$ds.":AVERAGE";
$rrd_options .= " DEF:".$ds."_max=".$rrd_filename.":".$ds.":MAX";
if($multiplier)
{
$rrd_options .= " DEF:".$ds."_o=".$rrd_filename.":".$ds.":AVERAGE";
$rrd_options .= " DEF:".$ds."_max_o=".$rrd_filename.":".$ds.":MAX";
$rrd_options .= " CDEF:".$ds."=".$ds."_o,$multiplier,*";
$rrd_options .= " CDEF:".$ds."_max=".$ds."_max_o,$multiplier,*";
} else {
$rrd_options .= " DEF:".$ds."=".$rrd_filename.":".$ds.":AVERAGE";
$rrd_options .= " DEF:".$ds."_max=".$rrd_filename.":".$ds.":MAX";
}
if ($print_total)
{
@@ -57,4 +66,4 @@ if ($percentile)
$rrd_options .= " LINE1:".$ds."_percentile#aa0000";
}
?>
?>

View File

@@ -2,8 +2,8 @@
global $config;
$graphs = array('apache_bytes' => 'Traffic - Bytes/sec',
'apache_hits' => 'Traffic - Hits',
$graphs = array('apache_bits' => 'Traffic',
'apache_hits' => 'Hits',
'apache_cpu' => 'CPU Utilisation',
'apache_scoreboard' => 'Scoreboard Statistics');
@@ -26,4 +26,4 @@ foreach ($graphs as $key => $text)
echo("</td></tr>");
}
?>
?>