diff options
| author | Pim van den Berg | 2014-06-24 12:38:10 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2014-06-24 12:44:37 +0200 |
| commit | d21f4a765b82e4c02ff15bf730b0e1f0d68d5471 (patch) | |
| tree | 567b1cb3fdbfb8b5ea33704ee8c665f4494647af /graph.php | |
| parent | plugin/tcpconns: fix missing port number in rrd title (diff) | |
| download | apt-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 '')
| -rw-r--r-- | graph.php | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -92,6 +92,9 @@ if (isset($plugin_json[$type]['rrdtool_opts'])) { | |||
| 92 | if (isset($plugin_json[$type]['datasize']) and $plugin_json[$type]['datasize']) | 92 | if (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 | ||
| 95 | if ($type == 'if_octets') | ||
| 96 | $obj->percentile = $CONFIG['percentile']; | ||
| 97 | |||
| 95 | if (isset($plugin_json[$type]['scale'])) | 98 | if (isset($plugin_json[$type]['scale'])) |
| 96 | $obj->scale = $plugin_json[$type]['scale']; | 99 | $obj->scale = $plugin_json[$type]['scale']; |
| 97 | 100 | ||
