Add statstack

must install prometheus node-exporter on postgres lxc

must update prometheus.yml to reflect exporter jobs

read up on other intigrations
This commit is contained in:
2026-02-20 17:36:37 -05:00
parent 88563324b2
commit f738e2650f

35
statstack Normal file
View File

@@ -0,0 +1,35 @@
services:
grafana:
image: grafana/grafana-oss:latest
restart: always
ports:
- "3000:3000"
environment:
# These environment variables configure Grafana to use the external Postgres DB for its *own* metadata
GF_DATABASE_TYPE: postgres
GF_DATABASE_HOST: 10.1.21.150:5432
GF_DATABASE_NAME: grafana
GF_DATABASE_USER: postgres
GF_DATABASE_PASSWORD: Rem1ember!
# Optional: Auto-assign default admin password on first run
GF_SECURITY_ADMIN_PASSWORD: Rem1ember!
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
restart: always
postgres-exporter:
image: quay.io/prometheuscommunity/postgres-exporter:latest
container_name: postgres-exporter
environment:
# Use a comma-separated list or leave the DB name blank for multi-DB discovery
- DATA_SOURCE_NAME=postgresql://postgres:Rem1ember!@10.1.21.150:5432/?sslmode=disable
ports:
- "9187:9187"
restart: always