fix(cgroups.plugin): correct is_cgroup_duplicate check (#21559)
Ilya Mashchenko committed
Jan 14, 2026 at 21:36 UTC
6393b37a06e358962170b8b545d240561a29dd43
1 file changed
+1
-1
src/collectors/cgroups.plugin/cgroup-discovery.c
+1
-1
@@ -1026,7 +1026,7 @@ static int discovery_is_cgroup_duplicate(struct cgroup *cg) {
1026
// https://github.com/netdata/netdata/issues/797#issuecomment-241248884
1027
struct cgroup *c;
1028
for (c = discovered_cgroup_root; c; c = c->discovered_next) {
1029
- if (c != cg && c->enabled && (is_cgroup_systemd_service(c) == is_cgroup_systemd_service(cg)) &&
1029
+ if (c != cg && c->enabled && c->available && (is_cgroup_systemd_service(c) == is_cgroup_systemd_service(cg)) &&
1030
c->hash_chart_id == cg->hash_chart_id && !strcmp(c->chart_id, cg->chart_id)) {
1031
collector_error(
1032
"CGROUP: chart id '%s' already exists with id '%s' and is enabled and available. Disabling cgroup with id '%s'.",