84 lines
1.9 KiB
YAML
84 lines
1.9 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
prometheus:
|
|
image: prom/prometheus:v2.52.0
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- ./rules:/etc/prometheus/rules:ro
|
|
- prometheus-data:/prometheus
|
|
command:
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
- "--storage.tsdb.retention.time=15d"
|
|
- "--web.enable-lifecycle"
|
|
ports:
|
|
- "9090:9090"
|
|
|
|
alertmanager:
|
|
image: prom/alertmanager:v0.27.0
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./.env
|
|
volumes:
|
|
- ./alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro
|
|
- alertmanager-data:/alertmanager
|
|
ports:
|
|
- "9093:9093"
|
|
|
|
grafana:
|
|
image: grafana/grafana:11.1.0
|
|
restart: unless-stopped
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=admin
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- prometheus
|
|
|
|
node-exporter:
|
|
image: prom/node-exporter:v1.8.1
|
|
restart: unless-stopped
|
|
pid: host
|
|
volumes:
|
|
- /:/host:ro,rslave
|
|
command:
|
|
- "--path.rootfs=/host"
|
|
ports:
|
|
- "9100:9100"
|
|
|
|
cadvisor:
|
|
image: gcr.io/cadvisor/cadvisor:v0.49.1
|
|
restart: unless-stopped
|
|
privileged: true
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:rw
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
smartctl-exporter:
|
|
image: prometheuscommunity/smartctl-exporter:v0.12.0
|
|
restart: unless-stopped
|
|
privileged: true
|
|
volumes:
|
|
- /dev:/dev
|
|
- /run/udev:/run/udev:ro
|
|
command:
|
|
- "--smartctl.device=auto"
|
|
ports:
|
|
- "9633:9633"
|
|
|
|
volumes:
|
|
prometheus-data:
|
|
grafana-data:
|
|
alertmanager-data:
|