Docker and Container Stats

prometheus

Docker and Container Stats screenshot 1
Docker and Container Stats screenshot 2
Docker and Container Stats screenshot 3
Docker and Container Stats screenshot 4
Docker and Container Stats screenshot 5
Docker and Container Stats screenshot 6

需要对模板就行修改,在设置—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’]
Revisions
RevisionDescriptionCreated
Docker

Docker

by Grafana Labs
Grafana Labs solution

Easily monitor Docker with Grafana Cloud's out-of-the-box monitoring solution.

Learn more

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies