mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
rra? no. you mean ds. also make multi_bits_separated prettier
git-svn-id: http://www.observium.org/svn/observer/trunk@2534 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
|
||||
/// Draw generic bits graph
|
||||
/// args: rra_in, rra_out, rrd_filename, bg, legend, from, to, width, height, inverse, percentile
|
||||
/// args: ds_in, ds_out, rrd_filename, bg, legend, from, to, width, height, inverse, percentile
|
||||
|
||||
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:".$rra."=".$rrd_filename.":".$rra.":AVERAGE";
|
||||
$rrd_options .= " DEF:".$rra."_max=".$rrd_filename.":".$rra.":MAX";
|
||||
$rrd_options .= " DEF:".$ds."=".$rrd_filename.":".$ds.":AVERAGE";
|
||||
$rrd_options .= " DEF:".$ds."_max=".$rrd_filename.":".$ds.":MAX";
|
||||
|
||||
if ($print_total)
|
||||
{
|
||||
$rrd_options .= " VDEF:".$rra."_total=rra,TOTAL";
|
||||
$rrd_options .= " VDEF:".$ds."_total=ds,TOTAL";
|
||||
}
|
||||
|
||||
if ($percentile)
|
||||
{
|
||||
$rrd_options .= " VDEF:".$rra."_percentile=".$rra.",".$percentile.",PERCENT";
|
||||
$rrd_options .= " VDEF:".$ds."_percentile=".$ds.",".$percentile.",PERCENT";
|
||||
}
|
||||
|
||||
if ($graph_max)
|
||||
{
|
||||
$rrd_options .= " AREA:".$rra."_max#".$colour_area_max.":";
|
||||
$rrd_options .= " AREA:".$ds."_max#".$colour_area_max.":";
|
||||
}
|
||||
$rrd_options .= " AREA:".$rra."#".$colour_area.":";
|
||||
$rrd_options .= " AREA:".$ds."#".$colour_area.":";
|
||||
$rrd_options .= " COMMENT:'".$unit_text."Now Ave Max";
|
||||
|
||||
if ($percentile)
|
||||
@@ -34,14 +34,14 @@ if ($percentile)
|
||||
}
|
||||
|
||||
$rrd_options .= "\\n'";
|
||||
$rrd_options .= " LINE1.25:".$rra."#".$colour_line.":'".$line_text."'";
|
||||
$rrd_options .= " GPRINT:".$rra.":LAST:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:".$rra.":AVERAGE:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:".$rra."_max:MAX:%6.2lf%s";
|
||||
$rrd_options .= " LINE1.25:".$ds."#".$colour_line.":'".$line_text."'";
|
||||
$rrd_options .= " GPRINT:".$ds.":LAST:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:".$ds.":AVERAGE:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:".$ds."_max:MAX:%6.2lf%s";
|
||||
|
||||
if ($percentile)
|
||||
{
|
||||
$rrd_options .= " GPRINT:".$rra."_percentile:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:".$ds."_percentile:%6.2lf%s";
|
||||
}
|
||||
|
||||
$rrd_options .= "\\\\n";
|
||||
@@ -49,12 +49,12 @@ $rrd_options .= " COMMENT:\\\\n";
|
||||
|
||||
if ($print_total)
|
||||
{
|
||||
$rrd_options .= " GPRINT:".$rra."_tot:Total\ %6.2lf%s\)\\\\l";
|
||||
$rrd_options .= " GPRINT:".$ds."_tot:Total\ %6.2lf%s\)\\\\l";
|
||||
}
|
||||
|
||||
if ($percentile)
|
||||
{
|
||||
$rrd_options .= " LINE1:".$rra."_percentile#aa0000";
|
||||
$rrd_options .= " LINE1:".$ds."_percentile#aa0000";
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user