Open
Description
Hi,
I have a system where the sensor fails to detect any running container, both when using docker or kubernetes directly.
When looking at the source code, I see that the sensor
- looks for containers in the subdirectories of the perf_event cgroup
ll /sys/fs/cgroup/perf_event/
(can be changed with the-p
flag - try to detect a type based on the path in this directory see
Line 56 in adfcb65
- then, for docker and kubernetes, validates the type based on an expected path 👍
perf_event/docker/...
for dockerperf_event/kubepods/...
for kubernetes
- If the validation fails, the container is ignored
On my system,
- kubernetes pods appear in
/sys/fs/cgroup/perf_event/kubepods.slice/
, are detected but fail type validation - docker containers appear in
/sys/fs/cgroup/perf_event/system.slice/
are detected but fail type validation too
As a consequences, no container is monitored.
Maybe we could bypass type detection and file validation altogether, as I proposed in the old #2 PR ? That should solve this issue.
Finally, I have no idea on why the /sys/fs/cgroup/perf_event
the system is diffferent on this system. It's a centos 7.2, I usually use debian and ubuntu systems and never had this issue before.
Please let me know if I can add something useful or if you have any idea to get me started on this issue.