Docker and Container Stats

Dashboard

prometheus
Last updated: 9 months ago

Downloads: 855

  • 2.png
    2.png
  • 4.png
    4.png
  • 3.png
    3.png
  • 1.png
    1.png
  • 6.png
    6.png
  • 5.png
    5.png

需要对模板就行修改,在设置---templating 点击,修改label_values(up{job="container"}, instance),其中注意修改container,它是在prometheus里面的标签,cadvisor端口为8090 docker run
--volume=/:/rootfs:ro
--volume=/var/run:/var/run:rw
--volume=/sys:/sys:ro
--volume=/var/lib/docker/:/data/docker:ro
-p 8090:8080
--detach=true
--name=cadvisor
google/cadvisor:latest
-storage_driver=influxdb
-storage_driver_db=cadvisor

在prometheus.yml文件文件添加;根据实际情况修改ip

  • job_name: 'container' static_configs:
    • targets: ['182.20.14.2:8090','182.20.15.3:8090','182.20.15.4:8090','182.20.15.5:8090']