diff options
author | Pim van den Berg | 2013-08-24 21:51:20 +0200 |
---|---|---|
committer | Pim van den Berg | 2013-08-24 21:51:20 +0200 |
commit | 5503a32be72f0da164126fa9efe7d1a77f6cd1d7 (patch) | |
tree | 6e451546d6cecdb610555f6c7db07ba643ac8b83 /inc/collectd.inc.php | |
parent | type/default: escape spaces in filenames (diff) | |
download | apt-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.php | 5 |
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 | } |