feat(monitoring): add Prometheus/Grafana monitoring stack

- Add Grafana dashboard service (port 3000)
- Add Prometheus time-series database (port 9090)
- Add PVE Exporter for Proxmox metrics (port 9221)
- Deploy on VM 101 (monitoring-docker) at 192.168.2.114
- Configure scraping for Proxmox node 192.168.2.100
- Add docker-compose configurations for all services
- Add template files for sensitive credentials (pve.yml.template, .env.template)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-07 12:41:22 -07:00
parent f42eeaba92
commit d4d8e69262
6 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
services:
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- "/home/server-admin/grafana/grafana-storage:/var/lib/grafana"

View File

@@ -0,0 +1,8 @@
services:
prometheus:
image: prom/prometheus
volumes:
- "/home/server-admin/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml"
- "/home/server-admin/prometheus/data:/prometheus"
ports:
- 9090:9090

View File

@@ -0,0 +1,17 @@
scrape_configs:
- job_name: 'pve'
static_configs:
- targets:
- 192.168.2.100 # 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.2.114:9221 #PVE Exporter Address

View File

@@ -0,0 +1 @@
PVE_CONFIG_PATH=/path/to/your/pve.yml

View File

@@ -0,0 +1,14 @@
version: '3.8'
services:
pve-exporter:
image: prompve/prometheus-pve-exporter:latest
container_name: pve-exporter
ports:
- "9221:9221"
restart: unless-stopped
volumes:
- ${PVE_CONFIG_PATH}:/etc/prometheus/pve.yml:ro
env_file:
- .env
labels:
org.label-schema.group: "monitoring"

View File

@@ -0,0 +1,4 @@
default:
user: monitoring@pve
password: YOUR_MONITORING_USER_PASSWORD_HERE
verify_ssl: false