From 28a7ba8de7fb7950ba0af942d60430bccd61c40f Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 7 Oct 2011 19:48:15 +0000 Subject: [PATCH] apache graph improvements. bytes => bits git-svn-id: http://www.observium.org/svn/observer/trunk@2667 61d68cd4-352d-0410-923a-c4978735b2b8 --- .../{apache_bytes.inc.php => apache_bits.inc.php} | 4 +++- .../graphs/application/apache_cpu.inc.php | 4 ++-- .../graphs/application/apache_hits.inc.php | 4 ++-- html/includes/graphs/generic_simplex.inc.php | 15 ++++++++++++--- html/pages/device/apps/apache.inc.php | 6 +++--- 5 files changed, 22 insertions(+), 11 deletions(-) rename html/includes/graphs/application/{apache_bytes.inc.php => apache_bits.inc.php} (91%) diff --git a/html/includes/graphs/application/apache_bytes.inc.php b/html/includes/graphs/application/apache_bits.inc.php similarity index 91% rename from html/includes/graphs/application/apache_bytes.inc.php rename to html/includes/graphs/application/apache_bits.inc.php index e54ab78dbb..49d1d46915 100755 --- a/html/includes/graphs/application/apache_bytes.inc.php +++ b/html/includes/graphs/application/apache_bits.inc.php @@ -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"); diff --git a/html/includes/graphs/application/apache_cpu.inc.php b/html/includes/graphs/application/apache_cpu.inc.php index cdf09ee8a6..bb49d3f639 100755 --- a/html/includes/graphs/application/apache_cpu.inc.php +++ b/html/includes/graphs/application/apache_cpu.inc.php @@ -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"; diff --git a/html/includes/graphs/application/apache_hits.inc.php b/html/includes/graphs/application/apache_hits.inc.php index f80065b8e2..0f0d4832cc 100755 --- a/html/includes/graphs/application/apache_hits.inc.php +++ b/html/includes/graphs/application/apache_hits.inc.php @@ -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"; diff --git a/html/includes/graphs/generic_simplex.inc.php b/html/includes/graphs/generic_simplex.inc.php index 936cc82a2d..4de320be6e 100644 --- a/html/includes/graphs/generic_simplex.inc.php +++ b/html/includes/graphs/generic_simplex.inc.php @@ -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"; } -?> \ No newline at end of file +?> diff --git a/html/pages/device/apps/apache.inc.php b/html/pages/device/apps/apache.inc.php index bafdda584b..4fba3587db 100644 --- a/html/pages/device/apps/apache.inc.php +++ b/html/pages/device/apps/apache.inc.php @@ -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(""); } -?> \ No newline at end of file +?>