cAdvisor prometheus integration returns container_cpu_load_average_10s as 0

耗尽温柔 提交于 2020-01-04 14:12:24

问题


I have configured Prometheus to scrape metrics from cAdvisor. However, the metric "container_cpu_load_average_10s" only returns 0. I am able to see the CPU metrics under the cAdvisor web UI correctly but Prometheus receives only 0. It is working fine for other metrics like "container_cpu_system_seconds_total". Could someone point if I am missing something here?

Prometheus version: 2.1.0

Prometheus config:

scrape_configs: - job_name: cadvisor scrape_interval: 5s metrics_path: /metrics scheme: http static_configs: - targets: - 172.17.0.2:8080

cAdvisor version: 0.29.0


回答1:


In order to get the metric "container_cpu_load_average_10s" the cAdvisor must run with the option "--enable_load_reader=true", by default this option is set to false. This is described here enter link description here



来源:https://stackoverflow.com/questions/49083348/cadvisor-prometheus-integration-returns-container-cpu-load-average-10s-as-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!