Skip to main content

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.

See plans and pricingOpen the live demoTalk to us

Checked on against 14 pages of postgres_exporter and Grafana documentation. PostgreSQL only. Markdown

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.

  1. Every finding comes with a fix

    PostgresAI

    Scheduled checkups turn each finding into an Issue with severity, evidence and a specific fix. docsdocs 2

    postgres_exporter and Grafana

    The postgres_exporter repository includes a mixin with alert rules such as PostgreSQLSlowQueries and PostgresTablesNotVaccumed; its README calls it a work in progress. The sources we reviewed do not describe recommendations or fixes. 314

  2. 13 months of history

    PostgresAI

    Scale keeps 13 months of history. docs

    postgres_exporter and Grafana

    Prometheus 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

  3. Test the fix on a full-size copy first

    PostgresAI

    With 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 Grafana

    postgres_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.
The Issues list in the PostgresAI Console: unused indexes consuming 19.2 GiB, redundant indexes that can be deleted to save 3.76 GiB, an invalid index and estimated index bloat, each opened by a checkup.

What you get​

Checkup findings as Issues in the PostgresAI Console. How it works

See plans and pricingOpen the live demoTalk to us

PostgresAI and postgres_exporter and Grafana, side by side​

QuestionPostgresAIpostgres_exporter and Grafana
What it isPostgreSQL 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 2A 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 versionsYesAmazon 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. docsYesThe 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 collectsYesHosted 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 2YesYou 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 sourceYesThe monitoring software is open source under Apache 2.0. Hosted plans are a separate paid service. docsdocs 2Yespostgres_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 analysisYesTop 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 2PartlyA 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 analysisYesAn ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docsYesThe 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 recommendationsYesScheduled 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 2PartlyThe 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 accessYesThe 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 2Not documentedNot documented in the sources we reviewed. 16
Testing a fix before productionYesWith 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 2Not documentedNot documented in the sources we reviewed. 1
Human PostgreSQL expertsYesScale 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 2Not documentedNot documented in the sources we reviewed. 1
AlertsEmail and Slack alerts on Starter and Scale. docsYou 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 kept14 days on Starter, 13 months on Scale, custom on Enterprise. docsPrometheus 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 attestationsSOC 2 Type 2 examination completed for the Security and Availability criteria, covering March 4 to June 4, 2026. The SOC 3 report is public. docsNot documented in the sources we reviewed. The stack is software you run in your own environment. 1

Pricing​

ProductPlanList priceNotes
PostgresAIStarter$16 per cluster/monthPrimary only, 14-day retention, no expert requests included
PostgresAIScale$512 per cluster/monthPrimary and up to 5 replicas in one cluster, 13-month retention, Grafana dashboards, 2 expert requests a month
PostgresAIEnterpriseCustomContact sales
PostgresAISelf-hostedNo licence feeOpen source under Apache 2.0; you run it yourself
postgres_exporter and GrafanaOpen sourceFreepostgres_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.

See plans and pricingOpen the live demoTalk to us

Sources​

  1. postgres_exporter repository and README
  2. postgres_exporter: postgres_mixin
  3. postgres_mixin alert rules (source)
  4. postgres_exporter stat_activity collector (source, v0.21.0)
  5. Prometheus documentation: storage
  6. Prometheus documentation: alerting overview
  7. Prometheus documentation: alerting rules
  8. Alertmanager configuration
  9. Prometheus repository
  10. Grafana repository
  11. postgres_exporter documentation: overview
  12. postgres_exporter documentation: database permissions
  13. postgres_exporter documentation: AWS RDS
  14. 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.