Files
Portainer/statstack
nghedley f738e2650f Add statstack
must install prometheus node-exporter on postgres lxc

must update prometheus.yml to reflect exporter jobs

read up on other intigrations
2026-02-20 17:36:37 -05:00

36 lines
1.1 KiB
Plaintext

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