111 lines
2.7 KiB
YAML
111 lines
2.7 KiB
YAML
version: "3.9"
|
||
|
||
services:
|
||
# Grafana – visualisation dashboards
|
||
grafana:
|
||
image: grafana/grafana:latest
|
||
container_name: grafana
|
||
restart: unless-stopped
|
||
networks:
|
||
- frontend
|
||
- backend
|
||
ports:
|
||
- "7650:3000"
|
||
volumes:
|
||
- /srv/docker/supervision/grafana/data:/var/lib/grafana
|
||
- /srv/docker/supervision/grafana/conf/grafana.ini:/etc/grafana/grafana.ini
|
||
- /srv/docker/supervision/grafana/conf:/etc/grafana
|
||
- /srv/docker/supervision/grafana/logs:/var/log/grafana
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 5
|
||
labels:
|
||
- grafana.enable=true
|
||
|
||
# Node Exporter – métriques hôte
|
||
node-exporter:
|
||
image: prom/node-exporter:latest
|
||
container_name: node-exporter
|
||
restart: unless-stopped
|
||
networks:
|
||
- backend
|
||
pid: "host"
|
||
volumes:
|
||
- /proc:/host/proc:ro
|
||
- /sys:/host/sys:ro
|
||
- /:/rootfs:ro
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:9100/metrics"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 5
|
||
labels:
|
||
- node-exporter.enable=true
|
||
|
||
# Prometheus – collecte métriques
|
||
prometheus:
|
||
image: prom/prometheus:latest
|
||
container_name: prometheus
|
||
restart: unless-stopped
|
||
networks:
|
||
- backend
|
||
ports:
|
||
- "7651:9090"
|
||
volumes:
|
||
- /srv/docker/supervision/prometheus:/prometheus/data
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:9090/-/ready"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 5
|
||
labels:
|
||
- prometheus.enable=true
|
||
|
||
# SNMP Exporter – récupération métriques Synology
|
||
snmp-exporter:
|
||
image: prom/snmp-exporter:latest
|
||
container_name: snmp-exporter
|
||
restart: unless-stopped
|
||
networks:
|
||
- backend
|
||
ports:
|
||
- "9116:9116"
|
||
volumes:
|
||
- /srv/docker/supervision/snmp-exporter:/etc/snmp_exporter/data
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:9116/metrics"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 5
|
||
labels:
|
||
- snmp-exporter.enable=true
|
||
|
||
# Uptime-Kuma – monitoring uptime
|
||
uptime-kuma:
|
||
image: louislam/uptime-kuma:latest
|
||
container_name: uptime-kuma
|
||
restart: unless-stopped
|
||
networks:
|
||
- frontend
|
||
- backend
|
||
ports:
|
||
- "7655:3001"
|
||
volumes:
|
||
- /srv/docker/supervision/uptime-kuma:/app/data
|
||
- /srv/docker/supervision/uptime-kuma/logs:/app/logs
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:3001"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 5
|
||
labels:
|
||
- uptime-kuma.enable=true
|
||
|
||
networks:
|
||
frontend:
|
||
external: true
|
||
backend:
|
||
external: true
|