- Create grafana_reader role with SELECT-only access on all schemas - Init script runs on postgres first boot (docker-entrypoint-initdb.d) - Grafana PostgreSQL datasource provisioned with read-only credentials - Enables SQL queries in dashboards (user count, routes, etc.) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
602 B
YAML
32 lines
602 B
YAML
apiVersion: 1
|
|
|
|
datasources:
|
|
- name: Prometheus
|
|
uid: prometheus
|
|
type: prometheus
|
|
access: proxy
|
|
url: http://prometheus:9090
|
|
isDefault: true
|
|
editable: false
|
|
|
|
- name: Loki
|
|
uid: loki
|
|
type: loki
|
|
access: proxy
|
|
url: http://loki:3100
|
|
editable: false
|
|
|
|
- name: PostgreSQL
|
|
uid: postgres
|
|
type: postgres
|
|
access: proxy
|
|
url: postgres:5432
|
|
user: grafana_reader
|
|
editable: false
|
|
jsonData:
|
|
database: trails
|
|
sslmode: disable
|
|
maxOpenConns: 2
|
|
maxIdleConns: 1
|
|
secureJsonData:
|
|
password: $__env{GRAFANA_DB_PASSWORD}
|