aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf
diff options
context:
space:
mode:
authorPeter Wu2014-08-10 11:41:20 +0200
committerPeter Wu2014-08-10 12:42:51 +0200
commit57f657ddc06324416cef912dc691fffde6753206 (patch)
tree73a02a6cc49e063abeda98e3d81e061be8fb42be /conf
parentMerge (a)sync code, reformat CGP.js (diff)
downloadapt-panopticon_cgp-57f657ddc06324416cef912dc691fffde6753206.zip
apt-panopticon_cgp-57f657ddc06324416cef912dc691fffde6753206.tar.gz
apt-panopticon_cgp-57f657ddc06324416cef912dc691fffde6753206.tar.bz2
apt-panopticon_cgp-57f657ddc06324416cef912dc691fffde6753206.tar.xz
Support customized RRD URLs
Use case: I would like to bypass PHP for serving the RRD files and allow the webserver (nginx) to compress it to reduce load on the Raspberry Pi. I could go through all kinds of URL rewriting, but it is much easier to set `$CONFIG['rrd_url'] = 'rrd/{file}';` instead and add a corresponding location + alias directive to the nginx configuration. This depends on https://github.com/manuelluis/jsrrdgraph/pull/17 to avoid breaking on '='.
Diffstat (limited to 'conf')
-rw-r--r--conf/config.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/conf/config.php b/conf/config.php
index 66b5d0e..157012a 100644
--- a/conf/config.php
+++ b/conf/config.php
@@ -65,6 +65,11 @@ $CONFIG['graph_smooth'] = false;
65# draw min/max spikes in a lighter color in graphs with type default 65# draw min/max spikes in a lighter color in graphs with type default
66$CONFIG['graph_minmax'] = false; 66$CONFIG['graph_minmax'] = false;
67 67
68# The URL that provides RRD files for the "canvas" graph type. Examples:
69# 'rrd/{file}' is replaced by 'rrd/example.com/load/load.rrd'
70# 'rrd.php?path={file_escaped}' becomes 'rrd.php?path=host%3Fload%3Fload.rrd'
71$CONFIG['rrd_url'] = 'rrd.php?path={file_escaped}';
72
68# browser cache time for the graphs (in seconds) 73# browser cache time for the graphs (in seconds)
69$CONFIG['cache'] = 90; 74$CONFIG['cache'] = 90;
70 75