aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorManuel CISSÉ2010-06-21 13:52:00 +0200
committerPim van den Berg2010-06-22 20:22:12 +0200
commit2ee7bc20b82c84d5ff3bf9cab45d5e67937aaa1e (patch)
tree0293088d5602fc5f8600f2011ad949613f273db0
parentUptime plugin now display current/max/avg values in days instead of seconds (diff)
downloadapt-panopticon_cgp-2ee7bc20b82c84d5ff3bf9cab45d5e67937aaa1e.zip
apt-panopticon_cgp-2ee7bc20b82c84d5ff3bf9cab45d5e67937aaa1e.tar.gz
apt-panopticon_cgp-2ee7bc20b82c84d5ff3bf9cab45d5e67937aaa1e.tar.bz2
apt-panopticon_cgp-2ee7bc20b82c84d5ff3bf9cab45d5e67937aaa1e.tar.xz
Default time range on the summary page is now configurable
-rw-r--r--conf/config.php3
-rw-r--r--inc/collectd.inc.php4
2 files changed, 6 insertions, 1 deletions
diff --git a/conf/config.php b/conf/config.php
index a36c083..cebdc39 100644
--- a/conf/config.php
+++ b/conf/config.php
@@ -18,6 +18,9 @@ $CONFIG['rrdtool_opts'] = '';
18# default plugins to show on host page 18# default plugins to show on host page
19$CONFIG['overview'] = array('load', 'cpu', 'memory', 'swap'); 19$CONFIG['overview'] = array('load', 'cpu', 'memory', 'swap');
20 20
21# default plugins time range
22$CONFIG['time_range'] = array('uptime' => 31536000);
23
21# show load averages on overview page 24# show load averages on overview page
22$CONFIG['showload'] = true; 25$CONFIG['showload'] = true;
23 26
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php
index fde3267..3c8d48c 100644
--- a/inc/collectd.inc.php
+++ b/inc/collectd.inc.php
@@ -131,7 +131,9 @@ function graphs_from_plugin($host, $plugin) {
131 $CONFIG['weburl'], 131 $CONFIG['weburl'],
132 build_url('detail.php', $items), 132 build_url('detail.php', $items),
133 $CONFIG['weburl'], 133 $CONFIG['weburl'],
134 build_url('graph.php', $items) 134 (array_key_exists($plugin, $CONFIG['time_range']) ?
135 build_url('graph.php', $items, $CONFIG['time_range'][$plugin]) :
136 build_url('graph.php', $items) )
135 ); 137 );
136 } 138 }
137 } 139 }