From 8196b19096be64f3f3879d89a189372dbc8df313 Mon Sep 17 00:00:00 2001 From: Richard Kojedzinszky Date: Sun, 8 Nov 2015 18:27:00 +0100 Subject: [PATCH 1/2] I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index bae7770ff5..0fc3442795 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -67,4 +67,5 @@ Contributors to LibreNMS: - Richard Hartmann (RichiH) - Robert Gornall (rgormley) +- Richard Kojedzinszky (rkojedzinszky) [1]: http://observium.org/ "Observium web site" From ca595e1e9d56f0db995e39e8929eae19d79b635d Mon Sep 17 00:00:00 2001 From: Richard Kojedzinszky Date: Sun, 8 Nov 2015 18:27:19 +0100 Subject: [PATCH 2/2] FIX 95th percent lines in negative range --- html/includes/graphs/generic_data.inc.php | 2 +- html/includes/graphs/generic_multi_bits.inc.php | 4 ++-- html/includes/graphs/generic_multi_data.inc.php | 4 ++-- html/includes/graphs/generic_multi_data_separated.inc.php | 2 +- html/includes/graphs/generic_multi_seperated.inc.php | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/html/includes/graphs/generic_data.inc.php b/html/includes/graphs/generic_data.inc.php index e13fce80c4..63b75fde45 100644 --- a/html/includes/graphs/generic_data.inc.php +++ b/html/includes/graphs/generic_data.inc.php @@ -87,7 +87,7 @@ $rrd_options .= ' VDEF:tot=octets,TOTAL'; $rrd_options .= ' VDEF:95thin=inbits,95,PERCENT'; $rrd_options .= ' VDEF:95thout=outbits,95,PERCENT'; -$rrd_options .= ' VDEF:d95thout=doutbits,5,PERCENT'; +$rrd_options .= ' CDEF:d95thoutn=doutbits,-1,* VDEF:d95thoutn95=d95thoutn,95,PERCENT CDEF:d95thoutn95n=doutbits,doutbits,-,d95thoutn95,-1,*,+ VDEF:d95thout=d95thoutn95n,FIRST'; if ($format == 'octets' || $format == 'bytes') { $units = 'Bps'; diff --git a/html/includes/graphs/generic_multi_bits.inc.php b/html/includes/graphs/generic_multi_bits.inc.php index caa765e4dc..5233fdb818 100644 --- a/html/includes/graphs/generic_multi_bits.inc.php +++ b/html/includes/graphs/generic_multi_bits.inc.php @@ -57,7 +57,7 @@ if ($i) { $rrd_options .= ' CDEF:doutbits=doutoctets,8,*'; $rrd_options .= ' VDEF:95thin=inbits,95,PERCENT'; $rrd_options .= ' VDEF:95thout=outbits,95,PERCENT'; - $rrd_options .= ' VDEF:d95thout=doutbits,5,PERCENT'; + $rrd_options .= ' CDEF:d95thoutn=doutbits,-1,* VDEF:d95thoutn95=d95thoutn,95,PERCENT CDEF:d95thoutn95n=doutbits,doutbits,-,d95thoutn95,-1,*,+ VDEF:d95thout=d95thoutn95n,FIRST'; if ($_GET['previous'] == 'yes') { $rrd_options .= ' CDEF:'.$in.'octetsX='.$in_thingX.$pluses; @@ -68,7 +68,7 @@ if ($i) { $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'; + $rrd_options .= ' CDEF:d95thoutXn=doutbitsX,-1,* VDEF:d95thoutXn95=d95thoutXn,95,PERCENT CDEF:d95thoutXn95n=doutbitsX,doutbitsX,-,d95thoutXn95,-1,*,+ VDEF:d95thoutX=d95thoutXn95n,FIRST'; } if ($legend == 'no' || $legend == '1') { diff --git a/html/includes/graphs/generic_multi_data.inc.php b/html/includes/graphs/generic_multi_data.inc.php index 90f5c908e0..d3ab6c2e21 100644 --- a/html/includes/graphs/generic_multi_data.inc.php +++ b/html/includes/graphs/generic_multi_data.inc.php @@ -66,7 +66,7 @@ if ($i) { $rrd_options .= ' CDEF:doutbits=doutoctets,8,*'; $rrd_options .= ' VDEF:95thin=inbits,95,PERCENT'; $rrd_options .= ' VDEF:95thout=outbits,95,PERCENT'; - $rrd_options .= ' VDEF:d95thout=doutbits,5,PERCENT'; + $rrd_options .= ' CDEF:d95thoutn=doutbits,-1,* VDEF:d95thoutn95=d95thoutn,95,PERCENT CDEF:d95thoutn95n=doutbits,doutbits,-,d95thoutn95,-1,*,+ VDEF:d95thout=d95thoutn95n,FIRST'; if ($_GET['previous'] == 'yes') { $rrd_options .= ' CDEF:'.$in.'octetsX='.$in_thingX.$pluses; @@ -77,7 +77,7 @@ if ($i) { $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'; + $rrd_options .= ' CDEF:d95thoutXn=doutbitsX,-1,* VDEF:d95thoutXn95=d95thoutXn,95,PERCENT CDEF:d95thoutXn95n=doutbitsX,doutbitsX,-,d95thoutXn95,-1,*,+ VDEF:d95thoutX=d95thoutXn95n,FIRST'; } if ($legend == 'no' || $legend == '1') { diff --git a/html/includes/graphs/generic_multi_data_separated.inc.php b/html/includes/graphs/generic_multi_data_separated.inc.php index 7865d03de5..e73ac4e85c 100644 --- a/html/includes/graphs/generic_multi_data_separated.inc.php +++ b/html/includes/graphs/generic_multi_data_separated.inc.php @@ -111,7 +111,7 @@ if (!$nototal) { $rrd_options .= ' VDEF:95thin=inbits,95,PERCENT'; $rrd_options .= ' VDEF:95thout=outbits,95,PERCENT'; - $rrd_options .= ' VDEF:d95thout=doutbits,5,PERCENT'; + $rrd_options .= ' CDEF:d95thoutn=doutbits,-1,* VDEF:d95thoutn95=d95thoutn,95,PERCENT CDEF:d95thoutn95n=doutbits,doutbits,-,d95thoutn95,-1,*,+ VDEF:d95thout=d95thoutn95n,FIRST'; $rrd_options .= ' VDEF:totin=inoctets,TOTAL'; $rrd_options .= ' VDEF:totout=outoctets,TOTAL'; diff --git a/html/includes/graphs/generic_multi_seperated.inc.php b/html/includes/graphs/generic_multi_seperated.inc.php index 9b37f37515..8549b3b333 100644 --- a/html/includes/graphs/generic_multi_seperated.inc.php +++ b/html/includes/graphs/generic_multi_seperated.inc.php @@ -111,7 +111,7 @@ if ($_GET['previous'] == 'yes') { $rrd_options .= ' CDEF:doutbitsX=doutBX,8,*'; $rrd_options .= ' VDEF:95thinX=inbitsX,95,PERCENT'; $rrd_options .= ' VDEF:95thoutX=outbitsX,95,PERCENT'; - $rrd_options .= ' VDEF:d95thoutX=doutbitsX,5,PERCENT'; + $rrd_options .= ' CDEF:d95thoutXn=doutbitsX,-1,* VDEF:d95thoutXn95=d95thoutXn,95,PERCENT CDEF:d95thoutXn95n=doutbitsX,doutbitsX,-,d95thoutXn95,-1,*,+ VDEF:d95thoutX=d95thoutXn95n,FIRST'; } if ($_GET['previous'] == 'yes') { @@ -132,7 +132,7 @@ if (!$args['nototal']) { $rrd_options .= ' CDEF:doutbits=doutB,8,*'; $rrd_options .= ' VDEF:95thin=inbits,95,PERCENT'; $rrd_options .= ' VDEF:95thout=outbits,95,PERCENT'; - $rrd_options .= ' VDEF:d95thout=doutbits,5,PERCENT'; + $rrd_options .= ' CDEF:d95thoutn=doutbits,-1,* VDEF:d95thoutn95=d95thoutn,95,PERCENT CDEF:d95thoutn95n=doutbits,doutbits,-,d95thoutn95,-1,*,+ VDEF:d95thout=d95thoutn95n,FIRST'; $rrd_options .= ' VDEF:totin=inB,TOTAL'; $rrd_options .= ' VDEF:avein=inbits,AVERAGE'; $rrd_options .= ' VDEF:totout=outB,TOTAL';