@cryptotaxi247 / netdata-1 / commits / 43dac616e

enable libvirt cgroups

Costa Tsaousis (ktsaou) committed Mar 22, 2017 at 23:29 UTC 43dac616e9d146a886b9c9c81711ed4d3d852a58
1 file changed +14 -6
src/sys_fs_cgroup.c
+14 -6
@@ -147,11 +147,17 @@ void read_cgroup_plugin_configuration() {
147
148 enabled_cgroup_patterns = simple_pattern_create(
149 config_get("plugin:cgroups", "enable by default cgroups matching",
150 - " /system.slice/docker-*.scope "
151 - " /qemu.slice/*.scope " // #1949
150 + // ----------------------------------------------------------------
151 +
152 + " !*/init.scope " // ignore init.scope
153 + " *.scope " // we need all *.scope for sure
154 +
155 + // ----------------------------------------------------------------
156 +
157 + " !*/vcpu* " // libvirtd adds these sub-cgroups
158 + " !*/emulator " // libvirtd adds these sub-cgroups
159 " !*.mount "
160 " !*.partition "
154 - " !*.scope "
161 " !*.service "
162 " !*.slice "
163 " !*.swap "
@@ -171,12 +177,14 @@ void read_cgroup_plugin_configuration() {
177
178 enabled_cgroup_paths = simple_pattern_create(
179 config_get("plugin:cgroups", "search for cgroups in subpaths matching",
174 - " !*-qemu " // #345
180 + " !*/init.scope " // ignore init.scope
181 + " !*-qemu " // #345
182 " !/init.scope "
183 " !/system "
184 " !/systemd "
185 " !/user "
186 " !/user.slice "
187 + " !*.scope "
188 " * "
189 ), SIMPLE_PATTERN_EXACT);
190
@@ -185,13 +193,13 @@ void read_cgroup_plugin_configuration() {
193
194 enabled_cgroup_renames = simple_pattern_create(
195 config_get("plugin:cgroups", "run script to rename cgroups matching",
188 - " /qemu.slice/*.scope " // #1949
196 + " *.scope "
197 " *docker* "
198 " *lxc* "
199 + " *qemu* "
200 " !/ "
201 " !*.mount "
202 " !*.partition "
194 - " !*.scope "
203 " !*.service "
204 " !*.slice "
205 " !*.swap "