diff options
-rw-r--r-- | conf/config.php | 3 | ||||
-rw-r--r-- | inc/collectd.inc.php | 4 |
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 | } |