PostgresAI vs postgres_exporter and Grafana
Issues vs your own rules
postgres_exporter, Prometheus and Grafana form a metrics stack you assemble yourself. PostgresAI pairs each finding with a fix and keeps 13 months of history on Scale.
Where PostgresAI is ahead of postgres_exporter and Grafana
Each point pairs what our documentation says with what the postgres_exporter and Grafana documentation says. Follow the links and check.
Every finding comes with a fix
13 months of history
PostgresAIScale keeps 13 months of history. docs
postgres_exporter and GrafanaPrometheus keeps 15 days by default when neither a retention time nor a size is set. Its docs say local storage is not clustered or replicated; longer history uses a remote storage integration. 5
Test the fix on a full-size copy first
PostgresAIWith DBLab Engine, a separate open-source product, an index or query change runs on a full-size thin clone of the database, created in seconds, before it reaches production. docsdocs 2
postgres_exporter and Grafanapostgres_exporter exposes metrics from PostgreSQL statistics views for Prometheus to scrape. The sources we reviewed do not describe running an index or query change on a separate copy of the data. 11
Short answer
postgres_exporter exposes PostgreSQL metrics for Prometheus to scrape; Grafana draws dashboards and Alertmanager sends alerts. Every part is free and open source, and you choose the collectors, dashboards, alert rules and retention. The repository includes a mixin with alert rules and a Grafana dashboard. PostgresAI monitoring comes assembled, with collection, storage and pre-built Grafana dashboards (with Scale on hosted plans), and adds scheduled checkups that become Issues. Pick the exporter stack if you already run Prometheus and want full control. Pick PostgresAI for Postgres checkups, Issues and expert help.
When postgres_exporter and Grafana is the better choice
- Free and open source: postgres_exporter and Prometheus under Apache 2.0, Grafana under AGPL-3.0-only.
- The stat_activity collector, on by default, exports session counts by state, wait_event_type and wait_event at every scrape.
- Alertmanager can notify email, Slack, PagerDuty, Opsgenie, Microsoft Teams, Discord, Telegram, Jira, webhooks and more, with silencing, inhibition and aggregation.
- Collectors are switched on and off one by one, including Amazon Aurora collectors, and a multi-target mode lets one exporter probe managed services where a sidecar is not possible.
- Full control over retention, scrape intervals, dashboards and alert thresholds.

What you get
Checkup findings as Issues in the PostgresAI Console. How it works
PostgresAI and postgres_exporter and Grafana, side by side
| Question | PostgresAI | postgres_exporter and Grafana |
|---|---|---|
| What it is | PostgreSQL monitoring with scheduled health checkups. Findings become Issues with severity, evidence and a recommended fix, which you, your AI agent or a PostgresAI expert can act on. docsdocs 2 | A stack you assemble: postgres_exporter exposes PostgreSQL server metrics on port 9187, Prometheus scrapes and stores them, Grafana draws dashboards, and Alertmanager sends notifications. The exporter repository includes a mixin with alerting and recording rules and a Grafana dashboard. 126 |
| Where your Postgres can run, and which versions | YesAmazon RDS and Aurora, Google Cloud SQL, Azure Database for PostgreSQL, Supabase, Tiger Data, self-managed servers and Postgres running on Kubernetes. PostgreSQL 14 and newer, with the pg_stat_statements extension. docs | YesThe exporter connects as a regular database user; from PostgreSQL 10 its role is granted pg_monitor, or the narrower pg_read_all_stats. CI tests PostgreSQL 13 to 18. A guide covers Amazon RDS, Aurora collectors are off by default, and a multi-target mode is meant for cases where a sidecar is not possible, for example SaaS-managed services. 1112131 |
| Where it runs and what it collects | YesHosted by PostgresAI, or self-hosted in your own cloud account or on your own server. It collects database metadata such as statistics, normalized query texts and wait events, not table data or query parameters. docsdocs 2 | YesYou run every part: the exporter as a binary or the quay.io/prometheuscommunity/postgres-exporter image, Prometheus, Alertmanager and Grafana. The stat_statements collector does not export query text unless include_query is enabled. 16 |
| Open source | YesThe monitoring software is open source under Apache 2.0. Hosted plans are a separate paid service. docsdocs 2 | Yespostgres_exporter and Prometheus are under Apache 2.0. Grafana is distributed under AGPL-3.0-only, with Apache 2.0 exceptions listed in its LICENSING.md. 1910 |
| Query performance analysis | YesTop queries from pg_stat_statements by calls, execution time, planning time and rows, with a drill-down dashboard for a single query. For execution plans, Joe runs EXPLAIN on a DBLab clone. docsdocs 2 | PartlyA stat_statements collector reads pg_stat_statements, but it is disabled by default. When enabled it returns up to 100 statements by default, by queryId; query text is off by default and cut to 120 characters when on. Dashboards for it are yours to build. 1 |
| Wait event analysis | YesAn ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docs | YesThe stat_activity collector, on by default, exports session counts from pg_stat_activity labeled by state, wait_event_type and wait_event at each scrape. Dashboards for it are yours to build. 41 |
| Health checks and recommendations | YesScheduled checkup reports on settings, autovacuum and bloat, and indexes (invalid, unused, redundant). Each finding becomes an Issue with severity, evidence and a specific fix. docsdocs 2 | PartlyThe mixin defines alert rules, among them PostgreSQLDown, PostgreSQLHighConnections, PostgreSQLSlowQueries, PostgreSQLCacheHitRatio, PostgresHasHighDeadLocks, PostgresReplicationLaggingMore1Hour, PostgresHasReplicationSlotUsed and PostgresTablesNotVaccumed; its README calls it a work in progress. The sources we reviewed do not describe recommendations or fixes. 314 |
| AI and agent access | YesThe postgresai CLI (alias pgai) and an MCP server with tools for Issues, action items and checkup reports. The setup guide covers Cursor, Claude Code, Windsurf and Codex. docsdocs 2 | Not documentedNot documented in the sources we reviewed. 16 |
| Testing a fix before production | YesWith DBLab Engine, a separate open-source product: a full-size thin clone of the database in seconds, where an index or query change can be run on real data. DBLab is set up and priced separately. docsdocs 2 | Not documentedNot documented in the sources we reviewed. 1 |
| Human PostgreSQL experts | YesScale includes two expert requests a month, answered within 24 business hours. Either plan can buy a one-off pack of two requests for $500. Consulting is separate. docsdocs 2 | Not documentedNot documented in the sources we reviewed. 1 |
| Alerts | Email and Slack alerts on Starter and Scale. docs | You write alerting rules as PromQL expressions in Prometheus, which sends alerts to Alertmanager. Alertmanager receivers include email, Slack, PagerDuty, Opsgenie, Microsoft Teams, Discord, Telegram, Jira, Amazon SNS and webhooks. 768 |
| History kept | 14 days on Starter, 13 months on Scale, custom on Enterprise. docs | Prometheus keeps 15 days by default when neither a retention time nor a size is set. Local storage is not clustered or replicated; remote storage integrations can keep longer history. 5 |
| Security attestations | SOC 2 Type 2 examination completed for the Security and Availability criteria, covering March 4 to June 4, 2026. The SOC 3 report is public. docs | Not documented in the sources we reviewed. The stack is software you run in your own environment. 1 |
Pricing
| Product | Plan | List price | Notes |
|---|---|---|---|
| PostgresAI | Starter | $16 per cluster/month | Primary only, 14-day retention, no expert requests included |
| PostgresAI | Scale | $512 per cluster/month | Primary and up to 5 replicas in one cluster, 13-month retention, Grafana dashboards, 2 expert requests a month |
| PostgresAI | Enterprise | Custom | Contact sales |
| PostgresAI | Self-hosted | No licence fee | Open source under Apache 2.0; you run it yourself |
| postgres_exporter and Grafana | Open source | Free | postgres_exporter and Prometheus under Apache 2.0, Grafana under AGPL-3.0-only; you run and operate all parts 1910 |
List prices on 18 Nov 2026. The billing units differ, so this is not a total-cost comparison. PostgresAI pricing
Using PostgresAI with postgres_exporter and Grafana
Both use Grafana for dashboards. A team with Prometheus and postgres_exporter can keep its metrics and alert rules and add PostgresAI checkups and Issues for the same databases.
Questions
- Is postgres_exporter free?
- Yes. postgres_exporter and Prometheus are open source under Apache 2.0, and Grafana under AGPL-3.0-only. You run and operate them yourself. PostgresAI monitoring is also open source under Apache 2.0, with paid hosted plans. 1910
- Does postgres_exporter collect pg_stat_statements?
- Yes, through the stat_statements collector, which is disabled by default. It returns up to 100 statements by default; query text is off unless include_query is enabled, and is cut to 120 characters. 1
- Does postgres_exporter come with dashboards and alerts?
- The exporter repository includes postgres_mixin, which builds Prometheus alert and recording rules and Grafana dashboard JSON with mixtool. Notifications go through Alertmanager, which you configure. 26
- How long does Prometheus keep metrics?
- 15 days by default, if neither storage.tsdb.retention.time nor storage.tsdb.retention.size is set. Longer history needs more local disk or a remote storage integration. 5
- Can I use PostgresAI and postgres_exporter together?
- Yes. Both read PostgreSQL statistics, and both use Grafana for dashboards. A team can keep postgres_exporter alert rules in Prometheus and add PostgresAI checkups and Issues. 1
Check it on your own database
The express checkup works with PostgreSQL 14 or newer. With --no-upload it needs no account and sends no report data to PostgresAI. It needs Node.js 18 or newer and a database role with pg_monitor. Compare what it finds with what your current tool shows for the same database.
Sources
- postgres_exporter repository and README
- postgres_exporter: postgres_mixin
- postgres_mixin alert rules (source)
- postgres_exporter stat_activity collector (source, v0.21.0)
- Prometheus documentation: storage
- Prometheus documentation: alerting overview
- Prometheus documentation: alerting rules
- Alertmanager configuration
- Prometheus repository
- Grafana repository
- postgres_exporter documentation: overview
- postgres_exporter documentation: database permissions
- postgres_exporter documentation: AWS RDS
- postgres_mixin README
These pages compare what each product does for PostgreSQL; other databases and the rest of the stack are out of scope. What we say about the other product comes from its own documentation, pricing page, changelog or source repository, read on the date shown; each row cites its source. "Not documented" means we did not find it in those sources, not that the product cannot do it. Prices are list prices and the billing units differ, so they are not a total-cost comparison. Product names are trademarks of their owners. Found a mistake? Tell us and we will correct the page.
More comparisons
- Percona PMMwait events and clone tests vs QAN and Advisors
- pgBadgercontinuous monitoring vs log file reports
- PgHerohistory and wait events vs a performance dashboard
- pgMonitorfindings with fixes vs a Prometheus bundle
- pgwatchcheckups and Issues vs a metrics collector
- PoWAmanaged Postgres too vs extensions on each server
- temBoardmanaged Postgres too vs an agent on each host
- Amazon DevOps Guru for RDSany cloud vs ML on RDS (closing)
- All comparisons