feat 接入Prometheus

This commit is contained in:
2025-12-17 21:05:12 +08:00
parent efa9f50d3e
commit da91cff056
24 changed files with 289 additions and 60 deletions

View File

@@ -24,3 +24,33 @@ services:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/html:/var/www/html
- ./nginx/certs:/etc/nginx/certs:ro
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
command:
- '--config.file=/etc/prometheus/prometheus.yml'
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
environment:
- GF_SERVER_ROOT_URL=https://www.hlsq.asia/grafana/
- GF_SECURITY_ADMIN_PASSWORD=admin