PostgreSQL integration
The PostgreSQL integration monitors connections, replication, cache, locks, and table metrics. The integration reference calls this infrastructure-level observability. For query-level detail (slow queries, wait events, and execution plans), use Database Observability.
Metrics collected
The integration collects these PostgreSQL metric groups:
- Queries: Active, waiting, and duration. Waiting queries usually point to lock contention.
- Connections: Used, available, and by state, including how close you are to
max_connections. - Transactions: Commits, rollbacks, conflicts
- Replication: Lag and slot status, which show whether a standby is ready for failover.
- Vacuum: Dead tuples and autovacuum. PostgreSQL keeps old row versions until vacuum removes them, and the dashboards track that buildup.
What to know
This integration offers:
- Prebuilt dashboards: PostgreSQL cluster overview, PostgreSQL instance overview, PostgreSQL logs, PostgreSQL query performance
- Prebuilt alerts: connections, replication, vacuum
- Buffer cache hit ratio
- Query waiting and lock detection
Set it up
Open this path in your Grafana Cloud stack for a fully interactive experience, or read through it to understand the process first.
Monitor PostgreSQL with Grafana Alloy
Welcome to the Grafana learning path that shows you how to monitor PostgreSQL databases with Grafana Alloy and use pre-built dashboards and alerts in Grafana Cloud.
Open in Grafana Cloud
Complete this learning path directly in your Grafana Cloud stack with an interactive learning experience.