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:
9
monitoring/grafana/docker-compose.yml
Normal file
9
monitoring/grafana/docker-compose.yml
Normal 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"
|
||||
8
monitoring/prometheus/docker-compose.yml
Normal file
8
monitoring/prometheus/docker-compose.yml
Normal 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
|
||||
17
monitoring/prometheus/prometheus.yml
Normal file
17
monitoring/prometheus/prometheus.yml
Normal 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
|
||||
1
monitoring/pve-exporter/.env.template
Normal file
1
monitoring/pve-exporter/.env.template
Normal file
@@ -0,0 +1 @@
|
||||
PVE_CONFIG_PATH=/path/to/your/pve.yml
|
||||
14
monitoring/pve-exporter/docker-compose.yml
Normal file
14
monitoring/pve-exporter/docker-compose.yml
Normal 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"
|
||||
4
monitoring/pve-exporter/pve.yml.template
Normal file
4
monitoring/pve-exporter/pve.yml.template
Normal file
@@ -0,0 +1,4 @@
|
||||
default:
|
||||
user: monitoring@pve
|
||||
password: YOUR_MONITORING_USER_PASSWORD_HERE
|
||||
verify_ssl: false
|
||||
Reference in New Issue
Block a user