From 5503a32be72f0da164126fa9efe7d1a77f6cd1d7 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 24 Aug 2013 21:51:20 +0200 Subject: inc/collectd.inc.php: don't group type instances when snmp + if_octets The snmp plugin is saving if_octets this way: /snmp/if_octets-.rrd Where the interfaces plugin is saving if_octets with this structure: /interface-/if_octets.rrd --- inc/collectd.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc/collectd.inc.php') diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php index 1df8bb0..c906aaf 100644 --- a/inc/collectd.inc.php +++ b/inc/collectd.inc.php @@ -119,7 +119,10 @@ function group_plugindata($plugindata) { foreach ($plugindata as $item) { # backwards compatibility if ($CONFIG['version'] >= 5 || !preg_match('/^(df|interface)$/', $item['p'])) - if($item['p'] != 'libvirt') + if ( + $item['p'] != 'libvirt' && + ($item['p'] != 'snmp' && $item['t'] == 'if_octets') + ) unset($item['ti']); $data[] = $item; } -- cgit v1.1