cAdvisor is failing to collect the data for processes running inside the LXC container

778 Views Asked by At

I am using the cadvisor to collect the container health data.Here, I am using the below command to run the cadvisor:

sudo docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:ro --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=8080:8080 --detach=true --name=cadvisor google/cadvisor:latest

I am getting the CPU and memory-related data but it is failing to collect the state of the process running inside the LXC container.

For example: I want to get the state of the process "p", it is running inside the LXC container but the advisor is showing it as running.

ps output inside the container:

sh-4.4# ps ax | grep Audio
105 ?        Ssl    0:00 Audio -d
364 pts/0    S+     0:00 grep Audio

But, in cadvisor dashboard it is not showing as running state. It is giving "0" for the process which is running inside the container:

container_tasks_state{id="/lxc.payload.mycontainer/system.slice/Audio.service",image="",name="",state="running"} 0

Even it is not collecting any process-related data:

usage and cpu

Can anybody suggest to me what wrong I am doing here, please?

Regards.

0

There are 0 best solutions below