aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/collectd.inc.php
diff options
context:
space:
mode:
authorPim van den Berg2013-08-24 21:51:20 +0200
committerPim van den Berg2013-08-24 21:51:20 +0200
commit5503a32be72f0da164126fa9efe7d1a77f6cd1d7 (patch)
tree6e451546d6cecdb610555f6c7db07ba643ac8b83 /inc/collectd.inc.php
parenttype/default: escape spaces in filenames (diff)
downloadapt-panopticon_cgp-5503a32be72f0da164126fa9efe7d1a77f6cd1d7.zip
apt-panopticon_cgp-5503a32be72f0da164126fa9efe7d1a77f6cd1d7.tar.gz
apt-panopticon_cgp-5503a32be72f0da164126fa9efe7d1a77f6cd1d7.tar.bz2
apt-panopticon_cgp-5503a32be72f0da164126fa9efe7d1a77f6cd1d7.tar.xz
inc/collectd.inc.php: don't group type instances when snmp + if_octets
The snmp plugin is saving if_octets this way: <host>/snmp/if_octets-<port>.rrd Where the interfaces plugin is saving if_octets with this structure: <host>/interface-<port>/if_octets.rrd
Diffstat (limited to 'inc/collectd.inc.php')
-rw-r--r--inc/collectd.inc.php5
1 files changed, 4 insertions, 1 deletions
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) {
119 foreach ($plugindata as $item) { 119 foreach ($plugindata as $item) {
120 # backwards compatibility 120 # backwards compatibility
121 if ($CONFIG['version'] >= 5 || !preg_match('/^(df|interface)$/', $item['p'])) 121 if ($CONFIG['version'] >= 5 || !preg_match('/^(df|interface)$/', $item['p']))
122 if($item['p'] != 'libvirt') 122 if (
123 $item['p'] != 'libvirt' &&
124 ($item['p'] != 'snmp' && $item['t'] == 'if_octets')
125 )
123 unset($item['ti']); 126 unset($item['ti']);
124 $data[] = $item; 127 $data[] = $item;
125 } 128 }