Docker and Container Stats
prometheus
需要对模板就行修改,在设置—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’]
Data source config
Collector config:
Upload an updated version of an exported dashboard.json file from Grafana
Revision | Description | Created | |
---|---|---|---|
Download |
Docker
Easily monitor Docker with Grafana Cloud's out-of-the-box monitoring solution.
Learn more