mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-21 08:02:54 +02:00
more graph improvements
git-svn-id: http://www.observium.org/svn/observer/trunk@3065 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -18,6 +18,19 @@ foreach ($rrd_filenames as $key => $rrd_filename)
|
||||
$pluses .= $plus;
|
||||
$seperator = ",";
|
||||
$plus = ",+";
|
||||
|
||||
if($_GET['previous'])
|
||||
{
|
||||
$rrd_options .= " DEF:".$in."octets" . $i . "X=".$rrd_filename.":".$ds_in.":AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " DEF:".$out."octets" . $i . "X=".$rrd_filename.":".$ds_out.":AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " SHIFT:".$in."octets" . $i . "X:$period";
|
||||
$rrd_options .= " SHIFT:".$out."octets" . $i . "X:$period";
|
||||
$in_thingX .= $seperatorX . "inoctets" . $i . "X,UN,0," . "inoctets" . $i . "X,IF";
|
||||
$out_thingX .= $seperatorX . "outoctets" . $i . "X,UN,0," . "outoctets" . $i . "X,IF";
|
||||
$plusesX .= $plusX;
|
||||
$seperatorX = ",";
|
||||
$plusX = ",+";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -34,6 +47,19 @@ if ($i)
|
||||
$rrd_options .= " VDEF:95thout=outbits,95,PERCENT";
|
||||
$rrd_options .= " VDEF:d95thout=doutbits,5,PERCENT";
|
||||
|
||||
if($_GET['previous'] == "yes")
|
||||
{
|
||||
$rrd_options .= " CDEF:".$in."octetsX=" . $in_thingX . $pluses;
|
||||
$rrd_options .= " CDEF:".$out."octetsX=" . $out_thingX . $pluses;
|
||||
$rrd_options .= " CDEF:doutoctetsX=outoctetsX,-1,*";
|
||||
$rrd_options .= " CDEF:inbitsX=inoctetsX,8,*";
|
||||
$rrd_options .= " CDEF:outbitsX=outoctetsX,8,*";
|
||||
$rrd_options .= " CDEF:doutbitsX=doutoctetsX,8,*";
|
||||
$rrd_options .= " VDEF:95thinX=inbitsX,95,PERCENT";
|
||||
$rrd_options .= " VDEF:95thoutX=outbitsX,95,PERCENT";
|
||||
$rrd_options .= " VDEF:d95thoutX=doutbitsX,5,PERCENT";
|
||||
}
|
||||
|
||||
if ($legend == 'no' || $legend == '1')
|
||||
{
|
||||
$rrd_options .= " AREA:inbits#".$colour_area_in.":";
|
||||
@@ -58,6 +84,13 @@ if ($i)
|
||||
|
||||
$rrd_options .= " LINE1:95thin#aa0000";
|
||||
$rrd_options .= " LINE1:d95thout#aa0000";
|
||||
|
||||
if($_GET['previous'] == "yes")
|
||||
{
|
||||
$rrd_options .= " AREA:inbitsX#9999966:";
|
||||
$rrd_options .= " AREA:doutbitsX#99999966:";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#$rrd_options .= " HRULE:0#999999";
|
||||
|
||||
Reference in New Issue
Block a user