DocumentationpgSentinel Documentation

Grafana Integration

Configure Prometheus Data Source

Provision Grafana with a Prometheus data source pointing to the pgSentinel scrape endpoint.

datasource.yaml

apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://prometheus:9090
    editable: false

Provision Dashboards

Enable automatic dashboard loading on Grafana restart.

dashboard.yaml

apiVersion: 1
dashboards:
  - name: pgSentinel
    orgId: 1
    folder: PostgreSQL
    options:
      path: /var/lib/grafana/dashboards/pgsentinel

Download dashboard

curl -L https://raw.githubusercontent.com/pgElephant/pgsentinel/main/grafana/pgsentinel.json \
  -o /var/lib/grafana/dashboards/pgsentinel/pgsentinel.json
chown grafana:grafana /var/lib/grafana/dashboards/pgsentinel/pgsentinel.json

Customise Panels

  • Clone the default dashboard and adjust pool filters to focus on production vs staging.
  • Add annotations for deploy events by connecting to your CI system's webhook.
  • Pin the Wait Queue panel to the home dashboard for at-a-glance saturation monitoring.