coroot-node-agent
coroot-node-agent copied to clipboard
cgroup prefix matching for Amazon ECS missing
When running coroot-node-agent directly on an EC2 instance thats part of an ECS cluster, the following message is spammed:
W0905 11:42:31.320648 1826000 registry.go:305] failed to read proc cgroup: unknown container: /ecstasks.slice/ecstasks-[UID].slice/docker-[UID].scope
This seems to stem from the fact that the prefix matching is hardcoded and doesn't match ecstasks.slice:
https://github.com/coroot/coroot-node-agent/blob/8f1ee2673b4fde70d70bfa17a2ee0330739c0d68/cgroup/cgroup.go#L130-L172