improvements to smokeping (averaged graph). needs to ignore NaN values, though.

git-svn-id: http://www.observium.org/svn/observer/trunk@2706 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-11-01 13:48:27 +00:00
parent d9ad342748
commit 895f0bce79
4 changed files with 151 additions and 5 deletions

View File

@@ -39,11 +39,15 @@ if($vars['view'] == "incoming")
if (count($smokeping_files['in'][$device['hostname']]))
{
$graph_array['type'] = "device_smokeping_in_all";
$graph_array['type'] = "device_smokeping_in_all_avg";
$graph_array['id'] = $device['device_id'];
echo('<tr><td>');
echo('<h3>Average</h3>');
include("includes/print-quadgraphs.inc.php");
echo('</td></tr>');
$graph_array['type'] = "device_smokeping_in_all";
$graph_array['legend'] = no;
echo('<tr><td>');
echo('<h3>Aggregate</h3>');
include("includes/print-quadgraphs.inc.php");
@@ -78,15 +82,21 @@ if($vars['view'] == "incoming")
if (count($smokeping_files['out'][$device['hostname']]))
{
$graph_array['type'] = "device_smokeping_out_all";
$graph_array['type'] = "device_smokeping_out_all_avg";
$graph_array['id'] = $device['device_id'];
$graph_array['legend'] = no;
echo('<tr><td>');
echo('<h3>Aggregate</h3>');
include("includes/print-quadgraphs.inc.php");
echo('</td></tr>');
$graph_array['type'] = "device_smokeping_out_all";
$graph_array['legend'] = no;
echo('<tr><td>');
echo('<h3>Aggregate</h3>');
include("includes/print-quadgraphs.inc.php");
echo('</td></tr>');
unset($graph_array['legend']);
asort($smokeping_files['out'][$device['hostname']]);