mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
added the posibility to or not to stack values, made nfs stats graph without stack
This commit is contained in:
@@ -4,6 +4,7 @@ $scale_min = 0;
|
|||||||
$colours = 'mixed';
|
$colours = 'mixed';
|
||||||
$unit_text = 'Operation';
|
$unit_text = 'Operation';
|
||||||
$unitlen = 9;
|
$unitlen = 9;
|
||||||
|
$stack = 0;
|
||||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfsstats-'.$app['app_id'].'.rrd';
|
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfsstats-'.$app['app_id'].'.rrd';
|
||||||
$array = array(
|
$array = array(
|
||||||
'total' => array(
|
'total' => array(
|
||||||
|
@@ -69,10 +69,6 @@ foreach ($rrd_list as $rrd) {
|
|||||||
$rrd_options .= ' VDEF:tot'.$rrd['ds'].$i.'='.$rrd['ds'].$i.',TOTAL';
|
$rrd_options .= ' VDEF:tot'.$rrd['ds'].$i.'='.$rrd['ds'].$i.',TOTAL';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i) {
|
|
||||||
$stack = ':STACK';
|
|
||||||
}
|
|
||||||
|
|
||||||
$g_defname = $rrd['ds'];
|
$g_defname = $rrd['ds'];
|
||||||
if (is_numeric($multiplier)) {
|
if (is_numeric($multiplier)) {
|
||||||
$g_defname = $rrd['ds'].'_cdef';
|
$g_defname = $rrd['ds'].'_cdef';
|
||||||
@@ -92,6 +88,10 @@ foreach ($rrd_list as $rrd) {
|
|||||||
$t_defname = $g_defname;
|
$t_defname = $g_defname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i && ($stack === 1)) {
|
||||||
|
$stack = ':STACK';
|
||||||
|
}
|
||||||
|
|
||||||
$rrd_options .= ' LINE2:'.$g_defname.$i.'#'.$colour.":'".$descr."'$stack";
|
$rrd_options .= ' LINE2:'.$g_defname.$i.'#'.$colour.":'".$descr."'$stack";
|
||||||
$rrd_options .= ' GPRINT:'.$t_defname.$i.':LAST:%8.0lf%s GPRINT:'.$t_defname.$i.'min:MIN:%8.0lf%s';
|
$rrd_options .= ' GPRINT:'.$t_defname.$i.':LAST:%8.0lf%s GPRINT:'.$t_defname.$i.'min:MIN:%8.0lf%s';
|
||||||
$rrd_options .= ' GPRINT:'.$t_defname.$i.'max:MAX:%8.0lf%s GPRINT:'.$t_defname.$i.":AVERAGE:'%8.0lf%s\\n'";
|
$rrd_options .= ' GPRINT:'.$t_defname.$i.'max:MAX:%8.0lf%s GPRINT:'.$t_defname.$i.":AVERAGE:'%8.0lf%s\\n'";
|
||||||
|
Reference in New Issue
Block a user