You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When running a container through HashiCorp Nomad, or more broadly when running a container with cgroup v2 or --cgroupns private, the apm agent no longer detects that it is running in a container and does not transmit the container ID to the apm server.
Describe the solution you'd like
The apm agent should detect that it is running within a container and use alternative ways to detect the container ID when running with cgroup v2.
I don't have full control over container creation. I am also not interested in exposing the Docker socket to the container. The responses on extracting from /proc/self/mountinfo seems to work in my case. See below for demo.
Additional context
Some general troubleshooting from a running container in Nomad:
Unfortunately, it also looks like I missed the fact that this container ID in the mountinfo belongs to the pause container in the Nomad allocation, not the container that is logging APM traffic.
In the end we are at least getting Elastic to recognize that the agent is running in a Docker container. It just doesn't help much in linking other sources of data that are using the correct service's container ID.
Is your feature request related to a problem? Please describe.
When running a container through HashiCorp Nomad, or more broadly when running a container with cgroup v2 or
--cgroupns private
, the apm agent no longer detects that it is running in a container and does not transmit the container ID to the apm server.Describe the solution you'd like
The apm agent should detect that it is running within a container and use alternative ways to detect the container ID when running with cgroup v2.
Describe alternatives you've considered
I've referenced this stack overflow post:
https://stackoverflow.com/questions/68816329/how-to-get-docker-container-id-from-within-the-container-with-cgroup-v2
I don't have full control over container creation. I am also not interested in exposing the Docker socket to the container. The responses on extracting from
/proc/self/mountinfo
seems to work in my case. See below for demo.Additional context
Some general troubleshooting from a running container in Nomad:
The text was updated successfully, but these errors were encountered: