Open david-bickford opened 3 years ago
I also encountered a similar problem. Have you solved it please? #2841
Quick code analysis suggests that you need to set -enable_load_reader
flag.
What value are you expecting? Isn't is supposed to be 0?
Same issue.
Things I've tried:
--pid=host
--volume=/cgroup:/cgroup:ro
--userns=host
--enable_load_reader=true
Reference Links:
I'm trying to view the status of our Docker containers in Prometheus using cAdvisor. Every other stat seems to be working except for container_tasks_state. I'm running this on an AWS EC2 instance running Linux. Here is the version info output from cAdvisor.
cadvisor_version_info{cadvisorRevision="65fa5b44",cadvisorVersion="v0.37.0",dockerVersion="19.03.2",instance="host:8080",job="cadvisor",kernelVersion="4.15.0-1051-aws",osVersion="Alpine Linux v3.12"}
This is a link to screenshots of the results I get back from the container_tasks_state query and the running containers in our EC2 instance. As you can see the values are all 0 even though they are running.
I'm deploying cAdvisor to our EC2 instances using Ansible instead of running a docker-compose since we have many EC2 instances. Below is the Ansible script which pulls and runs cAdvisor.
Things I've tried:
--enable_load_reader=true