add some global graphs. for great cpu-eating justice!

git-svn-id: http://www.observium.org/svn/observer/trunk@3170 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-05-11 16:27:55 +00:00
parent f768558e7e
commit cd10fd2a61
4 changed files with 144 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
$i = 0;
foreach (dbFetchRows("SELECT * FROM `processors` AS P, devices AS D WHERE D.device_id = P.device_id") as $proc)
{
$rrd_filename = $config['rrd_dir'] . "/".$proc['hostname']."/" . safename("processor-" . $proc['processor_type'] . "-" . $proc['processor_index'] . ".rrd");
if (is_file($rrd_filename))
{
$descr = short_hrDeviceDescr($proc['processor_descr']);
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $descr;
$rrd_list[$i]['ds'] = "usage";
$i++;
}
}
$unit_text = "Load %";
$units = '%';
$total_units = '%';
$colours ='oranges';
$scale_min = "0";
$scale_max = "100";
$divider = $i;
$text_orig = 1;
$nototal = 1;
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
?>