if(*r == '\0') r = "/";
else if (*r == '/') r++;
+ // do not decent in directories we are not interested
+ // https://github.com/firehol/netdata/issues/345
+ int def = 1;
+ size_t len = strlen(r);
+ if(len > 5 && !strncmp(&r[len - 5], "-qemu", 5))
+ def = 0;
+
// we check for this option here
// so that the config will not have settings
// for leaf directories
char option[FILENAME_MAX + 1];
snprintfz(option, FILENAME_MAX, "search for cgroups under %s", r);
option[FILENAME_MAX] = '\0';
- enabled = config_get_boolean("plugin:cgroups", option, 1);
+ enabled = config_get_boolean("plugin:cgroups", option, def);
}
if(enabled) {