Docker-compose file for monitoring and observability.
version: "3.3"
services:
grafana-enterprise:
ports:
- 3000:3000
container_name: grafana
volumes:
- grafana-storage:/var/lib/grafana # Persistent storage for dashboards and configs
image: grafana/grafana-enterprise
restart: unless-stopped
influxdb:
container_name: influxdb
image: docker.io/library/influxdb:2.7.11-alpine
ports:
- 8086:8086
volumes:
- influxdb-data:/var/lib/influxdb2 # InfluxDB data
- /etc/influxdb2:/etc/influxdb2 # Local configuration
restart: unless-stopped
prometheus:
ports:
- 9090:9090
volumes:
- ~/observability/prometheus.yml:/etc/prometheus/prometheus.yml # Prometheus configuration
- prometheus-data:/prometheus # Persistent data
image: prom/prometheus
restart: unless-stopped
prometheus-pve-exporter:
init: true # Properly initializes the container
container_name: prometheus-pve-exporter
ports:
- 0.0.0.0:9221:9221
volumes:
- ~/observability/prometheus-exporter.yml:/etc/prometheus/pve.yml # Exporter config
image: prompve/prometheus-pve-exporter
restart: unless-stopped
# Named volumes for persistent data
volumes:
prometheus-data: {}
grafana-storage: {}
influxdb-data: {}
prometheus-exporter.yml
default:
user:
password:
# Optional: set to false to skip SSL/TLS verification
verify_ssl: false
prometheus.yml
scrape_configs:
- job_name: 'pve'
static_configs:
- targets:
- 192.168.1.48 # Proxmox VE node.
metrics_path: /pve
params:
module: [default]
cluster: ['1']
node: ['1']
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 192.168.1.45:9221 # PVE exporter.