version: '3.2'
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
ports:
- '9090:9090'
user: '0'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus/data'
- '--storage.tsdb.retention=90d'
- '--web.enable-lifecycle'
volumes:
- ./etc/prometheus:/etc/prometheus
- ./data/prometheus/data:/prometheus/data
depends_on:
- cadvisor
cadvisor:
image: google/cadvisor:latest
container_name: cadvisor
restart: unless-stopped
ports:
- '
docker-compose 编排的prometheus+cadvisor+node-exporter+grafana样例
最新推荐文章于 2024-03-26 11:11:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)