84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
version: '3.8'
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
grafana_data:
|
|
|
|
services:
|
|
# 1. PROMETHEUS (De Database)
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: prometheus
|
|
restart: unless-stopped
|
|
volumes:
|
|
# Zorg dat dit pad klopt met waar je het bestand in Stap 1 hebt gemaakt!
|
|
- /root/docker/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
- '--web.enable-lifecycle'
|
|
ports:
|
|
- "9090:9090"
|
|
|
|
# 2. GRAFANA (Het Dashboard)
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: grafana
|
|
restart: unless-stopped
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
ports:
|
|
- "3080:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=MisticDruid
|
|
# Vul hier je gewenste wachtwoord in
|
|
- GF_SECURITY_ADMIN_PASSWORD=HRNdd@#ff#4nfc9X
|
|
|
|
# 3. NODE EXPORTER (Server Statistieken: CPU/RAM/Disk)
|
|
node_exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: node_exporter
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
command:
|
|
- '--path.procfs=/host/proc'
|
|
- '--path.rootfs=/rootfs'
|
|
- '--path.sysfs=/host/sys'
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
|
ports:
|
|
- "9100:9100"
|
|
|
|
# 4. CADVISOR (Container Statistieken)
|
|
cadvisor:
|
|
image: gcr.io/cadvisor/cadvisor:latest
|
|
container_name: cadvisor
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:rw
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
- /dev/disk/:/dev/disk:ro
|
|
ports:
|
|
- "8081:8080"
|
|
devices:
|
|
- /dev/kmsg
|
|
privileged: true
|
|
|
|
prometheus-pve-exporter:
|
|
image: prompve/prometheus-pve-exporter
|
|
container_name: prometheus-pve-exporter
|
|
ports:
|
|
- "9221:9221"
|
|
environment:
|
|
- PVE_USER=prometheus@pve
|
|
- PVE_PASSWORD=ny7EEHmc5gVaG8
|
|
- PVE_VERIFY_SSL=false
|
|
restart: always
|