mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add apache application graph page, update generic multi bits
git-svn-id: http://www.observium.org/svn/observer/trunk@1597 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$i = 0;
|
||||
$rrd_options .= " COMMENT:' In\: Current Maximum '";
|
||||
$rrd_options .= " COMMENT:' In\: Current Maximum '";
|
||||
if(!$nototal) {$rrd_options .= " COMMENT:'Total '";}
|
||||
$rrd_options .= " COMMENT:'Out\: Current Maximum'";
|
||||
if(!$nototal) {$rrd_options .= " COMMENT:' Total'";}
|
||||
$rrd_options .= " COMMENT:'\\\\n'";
|
||||
$rrd_options .= " COMMENT:'\\n'";
|
||||
|
||||
foreach($rrd_list as $rrd) {
|
||||
if(!$config['graph_colours'][$colours_in][$iter] || !$config['graph_colours'][$colours_out][$iter]) { $iter = 0; }
|
||||
@@ -15,6 +15,8 @@
|
||||
$colour_in=$config['graph_colours'][$colours_in][$iter];
|
||||
$colour_out=$config['graph_colours'][$colours_out][$iter];
|
||||
|
||||
$descr = str_replace(":", "\:", substr(str_pad($rrd['descr'], 18),0,18));
|
||||
|
||||
$rrd_options .= " DEF:".$in.$i."=".$rrd['filename'].":".$rra_in.":AVERAGE ";
|
||||
$rrd_options .= " DEF:".$out.$i."=".$rrd['filename'].":".$rra_out.":AVERAGE ";
|
||||
$rrd_options .= " CDEF:inB".$i."=in".$i.",$multiplier,* ";
|
||||
@@ -28,7 +30,7 @@
|
||||
}
|
||||
$rrd_options .= " HRULE:999999999999999#" . $colour_out . ":\\\s:";
|
||||
if($i) {$stack="STACK";}
|
||||
$rrd_options .= " AREA:inB".$i."#" . $colour_in . ":'" . substr(str_pad($rrd['descr'], 18),0,18) . "':$stack";
|
||||
$rrd_options .= " AREA:inB".$i."#" . $colour_in . ":'" . $descr . "':$stack";
|
||||
$rrd_optionsb .= " AREA:outB".$i."_neg#" . $colour_out . "::$stack";
|
||||
$rrd_options .= " GPRINT:inB".$i.":LAST:%6.2lf%s$units";
|
||||
$rrd_options .= " GPRINT:inB".$i.":MAX:%6.2lf%s$units";
|
||||
|
||||
34
html/pages/device/apps/apache.inc.php
Normal file
34
html/pages/device/apps/apache.inc.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
global $config;
|
||||
|
||||
$graphs = array('apache_bytes' => 'Traffic - Bytes/sec',
|
||||
'apache_hits' => 'Traffic - Hits',
|
||||
'apache_cpu' => 'CPU Utilisation',
|
||||
'apache_scoreboard' => 'Scoreboard Statistics');
|
||||
|
||||
foreach($graphs as $key => $text) {
|
||||
|
||||
$graph_type = "apache_scoreboard";
|
||||
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "215";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['id'] = $app['app_id'];
|
||||
$graph_array['type'] = "application_".$key;
|
||||
|
||||
echo('<h3>'.$text.'</h3>');
|
||||
|
||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
||||
|
||||
|
||||
include("includes/print-quadgraphs.inc.php");
|
||||
|
||||
|
||||
echo("</td></tr>");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user