aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/graph.php
diff options
context:
space:
mode:
authorPim van den Berg2014-06-24 12:38:10 +0200
committerPim van den Berg2014-06-24 12:44:37 +0200
commitd21f4a765b82e4c02ff15bf730b0e1f0d68d5471 (patch)
tree567b1cb3fdbfb8b5ea33704ee8c665f4494647af /graph.php
parentplugin/tcpconns: fix missing port number in rrd title (diff)
downloadapt-panopticon_cgp-d21f4a765b82e4c02ff15bf730b0e1f0d68d5471.zip
apt-panopticon_cgp-d21f4a765b82e4c02ff15bf730b0e1f0d68d5471.tar.gz
apt-panopticon_cgp-d21f4a765b82e4c02ff15bf730b0e1f0d68d5471.tar.bz2
apt-panopticon_cgp-d21f4a765b82e4c02ff15bf730b0e1f0d68d5471.tar.xz
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
Diffstat (limited to 'graph.php')
-rw-r--r--graph.php3
1 files changed, 3 insertions, 0 deletions
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'])) {
92if (isset($plugin_json[$type]['datasize']) and $plugin_json[$type]['datasize']) 92if (isset($plugin_json[$type]['datasize']) and $plugin_json[$type]['datasize'])
93 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; 93 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
94 94
95if ($type == 'if_octets')
96 $obj->percentile = $CONFIG['percentile'];
97
95if (isset($plugin_json[$type]['scale'])) 98if (isset($plugin_json[$type]['scale']))
96 $obj->scale = $plugin_json[$type]['scale']; 99 $obj->scale = $plugin_json[$type]['scale'];
97 100