---
title: "PostgreSQL integration | Grafana Labs"
description: "Monitoring PostgreSQL databases"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# PostgreSQL integration

The PostgreSQL integration provides **database performance monitoring** for queries, connections, replication, and vacuum.

|                    |                                                                       |
|--------------------|-----------------------------------------------------------------------|
| **What it’s for**  | Monitoring queries, connections, replication, and vacuum/bloat health |
| **Under the hood** | Collects query, connection, replication, and vacuum metrics           |

## Metrics collected

The integration collects these metric groups for PostgreSQL:

- **Queries**: Active, waiting, duration
- **Connections**: Used, available, by state
- **Transactions**: Commits, rollbacks, conflicts
- **Replication**: Lag, slot status
- **Vacuum**: Dead tuples, autovacuum

## What to know

This integration offers:

- Prebuilt dashboards: PostgreSQL cluster overview, PostgreSQL instance overview, PostgreSQL logs, and PostgreSQL query performance
- 19 prebuilt alerts, including connections, replication, and vacuum
- Vacuum and dead tuple monitoring
- Buffer cache hit ratio insights
- Query waiting and lock detection

## Set it up

View the [PostgreSQL integration documentation](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/integrations/integration-reference/integration-postgres/).

Open this path in your Grafana Cloud stack for a fully interactive experience, or read through it to understand the process first.

Learning path

#### 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.

18 min

Beginner

Docs &amp; blog posts

#### Open in Grafana Cloud

Complete this learning path directly in your Grafana Cloud stack with an interactive learning experience.

[Open in Grafana Cloud]()

[View on website](/docs/learning-paths/postgresql-integration/)

[Path completed](/docs/learning-hub/intro-to-db-olly/03-database-integrations/19-resources/)
