diff options
Diffstat (limited to '')
| -rw-r--r-- | conf/config.php | 13 | ||||
| -rw-r--r-- | inc/collectd.inc.php | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/conf/config.php b/conf/config.php index da23449..149348a 100644 --- a/conf/config.php +++ b/conf/config.php | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | # collectd version | ||
| 4 | $CONFIG['version'] = 4; | ||
| 5 | |||
| 3 | # collectd's datadir | 6 | # collectd's datadir |
| 4 | $CONFIG['datadir'] = '/var/lib/collectd/rrd'; | 7 | $CONFIG['datadir'] = '/var/lib/collectd/rrd'; |
| 5 | 8 | ||
| @@ -21,16 +24,6 @@ $CONFIG['detail-heigth'] = 350; | |||
| 21 | # disabled: NULL | 24 | # disabled: NULL |
| 22 | $CONFIG['socket'] = NULL; | 25 | $CONFIG['socket'] = NULL; |
| 23 | 26 | ||
| 24 | # group data to show in a graph | ||
| 25 | # XXX: these settings have to move to their plugins | ||
| 26 | $CONFIG['groupby'] = array( | ||
| 27 | 'cpu' => 'type', | ||
| 28 | 'irq' => 'type', | ||
| 29 | 'memory' => 'type', | ||
| 30 | 'processes' => 'type', | ||
| 31 | 'swap' => 'type', | ||
| 32 | 'sensors' => 'type', | ||
| 33 | ); | ||
| 34 | 27 | ||
| 35 | # load local configuration | 28 | # load local configuration |
| 36 | if (file_exists(dirname(__FILE__).'/config.local.php')) | 29 | if (file_exists(dirname(__FILE__).'/config.local.php')) |
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php index ab4340f..fde3267 100644 --- a/inc/collectd.inc.php +++ b/inc/collectd.inc.php | |||
| @@ -112,7 +112,9 @@ function graphs_from_plugin($host, $plugin) { | |||
| 112 | $ts = collectd_plugindetail($host, $plugin, 't'); | 112 | $ts = collectd_plugindetail($host, $plugin, 't'); |
| 113 | $tis = collectd_plugindetail($host, $plugin, 'ti'); | 113 | $tis = collectd_plugindetail($host, $plugin, 'ti'); |
| 114 | if (!$pis) $pis = array('NULL'); | 114 | if (!$pis) $pis = array('NULL'); |
| 115 | if (!$tis || $CONFIG['groupby'][$plugin] == 'type') | 115 | if (!$tis) $tis = array('NULL'); |
| 116 | # backwards compatibility | ||
| 117 | if ($CONFIG['version'] >= 5 || !preg_match('/^(df|interface)$/', $plugin)) | ||
| 116 | $tis = array('NULL'); | 118 | $tis = array('NULL'); |
| 117 | 119 | ||
| 118 | foreach($pis as $pi) { | 120 | foreach($pis as $pi) { |
