Add prometheus and grafana for monitoring

This commit is contained in:
2026-03-13 18:10:28 +00:00
parent 557571c9fd
commit 2c380b511c
9 changed files with 234 additions and 22 deletions

34
monitoring/compose.yaml Normal file
View File

@@ -0,0 +1,34 @@
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
network_mode: host
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_INSTALL_PLUGINS=vonage-status-panel
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning:ro
ports:
- "4000:3000"
extra_hosts:
- "host-gateway:host-gateway"
depends_on:
- prometheus
volumes:
prometheus-data:
grafana-data: