From 90299a0c77e592cd5d25d9610357f65d33c778a6 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Fri, 1 Jan 2010 20:22:23 +0100 Subject: show all type instances in one graph Planned for collectd version 5.0 is to move the type instance of plugins df and interface to the plugin instance (see source). From version 5.0 the default is to group data from a type instance OR data source in one graph. In case of version 4 there are only 2 plugins to exclude from this: df and interface. Source: http://collectd.org/wiki/index.php/Plans_for_5.0 --- conf/config.php | 13 +++---------- 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 @@ 'type', - 'irq' => 'type', - 'memory' => 'type', - 'processes' => 'type', - 'swap' => 'type', - 'sensors' => 'type', -); # load local configuration 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) { $ts = collectd_plugindetail($host, $plugin, 't'); $tis = collectd_plugindetail($host, $plugin, 'ti'); if (!$pis) $pis = array('NULL'); - if (!$tis || $CONFIG['groupby'][$plugin] == 'type') + if (!$tis) $tis = array('NULL'); + # backwards compatibility + if ($CONFIG['version'] >= 5 || !preg_match('/^(df|interface)$/', $plugin)) $tis = array('NULL'); foreach($pis as $pi) { -- cgit v1.1