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:
- '8080:8080'
volumes:
- /:/rootfs:ro
- /var/run:/v
docker-compose 编排的prometheus+cadvisor+node-exporter+grafana样例
最新推荐文章于 2024-10-09 17:21:20 发布