mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
adding new graphing types
git-svn-id: http://www.observium.org/svn/observer/trunk@491 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
33
html/includes/graphs/generic_multi_line.inc.php
Normal file
33
html/includes/graphs/generic_multi_line.inc.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
|
||||
$unit_text = str_pad($unit_text, 10);
|
||||
$unit_text = substr($unit_text,0,10);
|
||||
|
||||
$i = 0;
|
||||
$iter = 0;
|
||||
|
||||
$rrd_options .= " COMMENT:'".$unit_text." Last Min Max Avg\\n'";
|
||||
|
||||
|
||||
foreach($rrd_list as $rrd) {
|
||||
if(!$config['graph_colours'][$colours][$iter]) { $iter = 0; }
|
||||
|
||||
$colour=$config['graph_colours'][$colours][$iter];
|
||||
|
||||
$rra = $rrd['rra'];
|
||||
$filename = $rrd['filename'];
|
||||
$descr = $rrd['descr'];
|
||||
|
||||
$id = $rra."_".$i;
|
||||
|
||||
$rrd_options .= " DEF:".$id."=$filename:$rra:AVERAGE";
|
||||
$rrd_options .= " LINE1.25:".$id."#".$colour.":'$descr'";
|
||||
$rrd_options .= " GPRINT:".$id.":LAST:%6.2lf GPRINT:".$id.":AVERAGE:%6.2lf";
|
||||
$rrd_options .= " GPRINT:".$id.":MAX:%6.2lf GPRINT:".$id.":AVERAGE:%6.2lf\\\\n";
|
||||
|
||||
$i++; $iter++;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user