From d21f4a765b82e4c02ff15bf730b0e1f0d68d5471 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Tue, 24 Jun 2014 12:38:10 +0200 Subject: add percentile support to network traffic graphs Set $CONFIG['percentile'] to a number and a XXth percentile line + legend will be added to all network traffic (if_octets) graphs. Closes #81 --- graph.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'graph.php') diff --git a/graph.php b/graph.php index 55be9e9..dadb2c5 100644 --- a/graph.php +++ b/graph.php @@ -92,6 +92,9 @@ if (isset($plugin_json[$type]['rrdtool_opts'])) { if (isset($plugin_json[$type]['datasize']) and $plugin_json[$type]['datasize']) $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; +if ($type == 'if_octets') + $obj->percentile = $CONFIG['percentile']; + if (isset($plugin_json[$type]['scale'])) $obj->scale = $plugin_json[$type]['scale']; -- cgit v1.1