环境:
问题:
我所拥有的(问题):
我想要的东西:
在Prometheus中的设置:
运行cAdvisor的命令:
sudo docker run --volume = /:/ rootfs:ro --volume = / var / run:/ var / run:rw --volume = / var / lib / docker /:/ var / lib / docker:ro- volume = / dev / disk /:/ dev / disk:ro --publish = 8080:8080 --name = cadvisor --detach = true --privileged = true --volume = / cgroup:/ cgroup:ro --network = docker8443 --ip = 172.28.5.201 google / cadvisor:latest
问题:
最佳答案
我认为问题与cadvisor有关。
您可以尝试检查cadvisor指标终结点:http://172.28.5.201:8080/metrics
确保cadvisor返回指标样本:
例:
# HELP container_start_time_seconds Start time of the container since unix epoch in seconds.
# TYPE container_start_time_seconds gauge
container_start_time_seconds{id="/",image="",name=""} 1.525939343e+09
container_start_time_seconds{id="/docker",image="",name=""} 1.526006565e+09
container_start_time_seconds{id="/docker/d4b87911bd0842ee1d6969e6a05aa3d36a48a801184faf14e1b23169e056da92",image="busybox",name="trusting_bassi"}