How to Set Up Alerts for Supabase: CPU, Disk, Connections and Errors

How to alert on Supabase connections, CPU, disk, and errors: the signals that matter, how Dreambase Triggers cover each one out of the box, other ways to wire the Metrics API into a monitoring stack, and how to route alerts without fatigue.

How to alert on Supabase connections, CPU, disk, and errors: the signals that matter, how Dreambase Triggers cover each one out of the box, other ways to wire the Metrics API into a monitoring stack, and how to route alerts without fatigue.

How to

2026-11-17

8 min read

Intended first value

You leave with a prioritized list of Supabase alert rules, a monitoring stack that fits your team, and a severity routing plan for Slack, PagerDuty, and email.

The fastest way to set up alerts for Supabase is to connect Dreambase Observability and turn on its preset Triggers, which cover connections, CPU, memory, disk, and availability out of the box and send to email, Slack, webhooks, or your agents. Underneath, Supabase gives you the signals: Studio Reports chart them, and the Metrics API exposes them to any monitoring backend if you’d rather build your own stack. Either way the goal is the same: separate rules for connections, CPU, disk, and errors, each routed by urgency, so you catch failures before your users do without turning every short spike into an interruption.

This guide covers where the data comes from, which signals deserve an alert and at what urgency, how Dreambase Triggers handle each one, the other ways to build an alert stack, how to route alerts to Slack, PagerDuty, and email, and the smallest setup worth running on day one. If you’re new to Supabase monitoring, start with our Supabase observability guide.

Why alert rules matter

At 3 AM the connection pool runs out, requests start failing, and nothing fires. Your users find the outage first. Connection exhaustion, a filling disk, and a degraded Auth service can all build quietly for hours even though the signals that would explain them are sitting in your dashboards.

Supabase Studio Reports cover memory, CPU, disk IOPS, database connections, disk usage, and database size, which makes them the place to investigate a health question or explain an incident after the fact. Alert rules are the other half: they watch the same numbers and tell someone when to step in, and the Metrics API is how Supabase hands those numbers to them.

The Metrics API is the foundation of every Supabase alert stack

Every hosted Supabase project exposes a Prometheus-compatible Metrics API at https://<project-ref>.supabase.co/customer/v1/privileged/metrics. It authenticates with HTTP Basic Auth, with service_role as the username and a Secret API key (sb_secret_…) as the password, and it returns about 200 Postgres and host series for CPU and memory, disk I/O and WAL, connections and the pooler, and query statistics. Use a dedicated Secret API key for the collector so you can rotate it without touching your app. The data refreshes every minute, so a one-minute scrape interval matches the source. Scraping faster just collects the same values again.

Because the output is standard Prometheus exposition format, any backend that reads it works without translation: Grafana Cloud, Datadog, Amazon Managed Prometheus, self-hosted Prometheus, VictoriaMetrics, or Grafana Mimir.

Two constraints matter when you write rules. The Metrics API is in beta, so metric names and labels can change, and a renamed series silently breaks the rule that depends on it. It also isn't available on self-hosted Supabase.

Dreambase Observability reads these same signals for you. Connect your Supabase organization once with read access, and it collects metrics every minute for every project, branch, and replica on paid Supabase plans, with no collector to run and no Secret API key to manage.

Which Supabase signals to alert on, and how urgent each one is

Connections: alert first

Connection exhaustion arrives fast. If the pooler fails and clients fall back to direct connections, they can burn through the connection budget in minutes. Start with a warning when active connections pass roughly 80% of max_connections, so you hear about it before clients can't connect at all.

Two connection signals point to application bugs rather than capacity. Sessions sitting idle in transaction for more than a few minutes usually mean code that opens a transaction and never closes it. Any increase in pg_stat_database_deadlocks_total means deadlocks. Give deadlocks their own rule, because adding compute won't fix them.

In Dreambase, the Connections near the limit preset warns at 80% or more for 5 minutes, and the Data API pool timeouts preset catches pool pressure on the API side. Monitoring charts deadlocks minute by minute, so a custom trigger can watch them too.

CPU: alert on duration, not spikes

An 80% CPU threshold is a reasonable starting point, but how long the pressure lasts matters more than the peak. Short spikes during a deploy or a batch job clear on their own and shouldn't page anyone. CPU that stays high for 10 or 15 minutes is a real signal and often the first sign you need a larger compute size. Tune the threshold to your project's normal load and compute tier.

In Dreambase, the CPU high and Memory high presets warn at 80% or more for 10 minutes, so a deploy spike never fires. Edit the level per project to match your compute tier.

Disk: alert with enough runway to act

Postgres degrades badly when storage fills, so warn on disk usage early enough that someone can expand the disk or clean up before it's urgent. Disk I/O needs its own rule. Smaller Supabase compute sizes can burst above their baseline IOPS and throughput for a limited time each day, then drop back to baseline once the burst budget is spent. That drop looks like unexplained slowness, so alert on sustained high I/O, not just on peaks.

In Dreambase, Disk nearly full warns at 90% and goes critical at 95%, then clears below 87% so it doesn’t flap. WAL filling the disk and Database growing fast, which warns at 20% growth in 12 hours, give you earlier notice of the same problem.

Errors and service availability: one rule per service

Treat Postgres, Auth, and the connection pooler separately, because each failure has a different blast radius. Postgres going down breaks everything. Auth going down blocks new sign-ins. The pooler going down can drain your connection budget fast. If you use read replicas, add a replication lag rule with a threshold that fits your workload, since growing lag means WAL is backing up.

In Dreambase, Database unreachable goes critical after 10 minutes without metrics, and Transaction IDs near wraparound guards a failure Postgres gives little other warning of. Event presets fire when a health check finds a new priority recommendation or the project’s health grade drops 10 points. To act on those recommendations, see our guide to improving Supabase database health with MCP.

Metrics collection: the alert that guards the others

When the scraper stops reporting, every other alert goes quiet, and no data looks exactly like a healthy database. Add an alert on missing or stale metrics so a broken collector can't hide a broken database.

Dreambase builds this in. A gap in the data never opens or closes an alert by itself, and the Database unreachable preset tells you when metrics stop arriving.

Five ways to set up Supabase monitoring and alerts, from easiest to most configurable

Dreambase Observability. Connect your Supabase organization, open a project’s Settings tab, and turn on the preset triggers all at once or one by one. Add destinations once and attach them to each trigger. It’s the shortest path from no alerts to tuned alerts, and for anything the presets don’t cover, describe the trigger to your agent and it builds it through the Dreambase MCP.

Grafana Cloud. The one-click integration in the Supabase dashboard sets up authentication, scraping, and a prebuilt dashboard covering resource pressure, disk and network activity, connections and pooler behavior, replication, checkpoints, database size, and query statistics. Alert rules are still yours to write in Grafana, though the supabase-grafana repo includes example rules for disk saturation, long-running queries, and replication lag to start from. The same dashboard definitions work on self-hosted Grafana.

Datadog. For teams already on Datadog, the Supabase integration collects the Metrics API through the Datadog Agent's OpenMetrics check or Prometheus remote write. It installs dashboards and monitor templates, and Datadog's anomaly monitors give you a learned-baseline alternative to fixed thresholds.

Elastic or SigNoz. If you already run one of these, use it. Elastic has a Supabase integration, and SigNoz has a Supabase dashboard template. Both read the Metrics API, so the choice follows the tooling you already operate.

Self-hosted Prometheus and Alertmanager. This gives you the most control and the most maintenance. Supabase's docs link to a self-hosted Prometheus setup, and supabase-grafana supplies the dashboards. It costs nothing in licenses and routes through Alertmanager, Grafana OnCall, or any other receiver, but your team runs the infrastructure.

Route Supabase alerts to Slack, PagerDuty, and email by severity

Sending every alert to every channel trains people to ignore them. Map each rule to a severity and each severity to one destination:

  • Critical: PagerDuty. Postgres is down, or the connection budget is exhausted. Someone needs to act now.

  • High: Slack plus email. CPU pressure that lasts, or disk usage nearing its limit. Someone should act today.

  • Medium: Slack only. Rising replication lag or a shrinking disk I/O burst budget. Worth watching.

  • Low: logs for scheduled review. Index regressions and idle-in-transaction sessions.

In Alertmanager, express this with the routes block: a route matching severity="critical" points to a pagerduty-critical receiver, and one matching severity="warning" points to slack-notifications. The severity labels on your rules are what connect them to the right destination, so a capacity warning never follows the same path as an outage.

In Datadog, routing lives in each monitor. Add @slack-<workspace>-<channel> in the notification field for the destination you want.

Routing alone doesn't prevent alert fatigue. Require a condition to hold across several samples before it fires, and size those durations around the Metrics API's one-minute refresh.

Dreambase builds this routing into every trigger. Send its warning level to Slack and its critical level to email or a webhook that pages someone, and each alert sends one message when it starts and one when it clears, so the channel tells you when it’s over too.

Fixed thresholds or anomaly detection

Fixed thresholds are simple, need no learning period, and behave predictably during an incident. They're the right tool for absolute limits like disk space and max_connections, where getting close to the limit is dangerous no matter what your baseline looks like.

Performance metrics are less clear-cut. A fixed 80% CPU warning can over-alert on a small compute tier and under-alert on a workload that normally runs near that line. Anomaly detection, such as Datadog's anomaly monitors, compares current values to learned behavior, which suits CPU and query latency where "high" depends on what's normal for your project. Use fixed thresholds for resource limits and anomaly detection for performance drift. Either way, keep duration conditions so sustained pressure is separated from a passing burst.

Agent checks as a complement to threshold alerts

Supabase's observability docs describe scheduled agent prompts for repeatable checks and plain-language diagnosis. A Health prompt runs hourly to look for API and Auth errors and connection pressure. A Security prompt runs daily to review advisor findings and authorization failures. A Performance prompt runs hourly over sessions, query regressions, and performance advisors, and a Resources prompt runs each morning to track sizes, connections, request growth, and forecasts. Agents can post their findings to Slack or Linear.

These prompts add context, not speed. A Prometheus rule fires as soon as fresh data crosses the line, while an hourly agent can find the same problem close to an hour later. Keep threshold rules for anything urgent and use agents for the narrative around it. For more on this pattern, see our guide to agent observability.

Dreambase connects the two. Preset triggers can hand an alert straight to a Claude routine or Grok Bot that investigates it, and ChatGPT and other agents connected to the Dreambase MCP can subscribe to every alert through MCP events, so the investigation starts the moment the alert fires. To take it further, see how to build a full-time SRE agent that monitors Supabase and Vercel.

MCP access to your database is a new alert surface

An agent following injected instructions can read data it has permission to see without causing any CPU or connection anomaly, so resource alerts won't catch it. If agents reach your database over MCP in production, put MCP-layer audit logging in your alert pipeline and treat events like a query against a sensitive table at an unusual time as alertable. The safer design keeps agents off production Postgres entirely and gives them pre-modeled, governed datasets instead.

The minimum viable Supabase alerting setup

For an early-stage team, the quickest dependable setup is Dreambase: connect your Supabase organization, turn on the preset triggers for your production project, and send warnings to Slack and critical alerts to email. To build the same coverage yourself:

  1. Enable pg_stat_statements and auto_explain so you can see individual queries when a warning fires.

  2. Connect Grafana Cloud through the one-click integration in the Supabase dashboard.

  3. Add four rules first: active connections near the limit, disk space below a safe threshold, Postgres availability, and metrics scraper health.

  4. Add rules for sustained CPU pressure and separate availability rules for Auth and the pooler.

  5. Send critical alerts to PagerDuty or a dedicated Slack channel, with duration conditions so short spikes don't fire.

  6. Schedule the Health, Security, Performance, and Resources prompts, and review your top queries by total execution time each quarter.

That gives a small team dependable coverage without a dedicated operations function.

How Dreambase compares with Grafana and Datadog

All three read the same Supabase signals, so the difference is how much you set up and what an alert can do once it fires.

  • Setup. Dreambase connects to your Supabase organization with read access, with no collector to run and no Secret API key to rotate. Grafana Cloud’s one-click integration handles scraping and dashboards, and Datadog collects through its Agent or Prometheus remote write.

  • Alert rules. Dreambase starts every project with presets built on the Supabase team’s recommendations, which you turn on and tune. In Grafana you write rules yourself, starting from the example set, and Datadog gives you monitor templates to adapt.

  • What a trigger can watch. A Dreambase trigger can watch business metrics in your workspace, like signups or revenue, next to CPU and disk, and event triggers fire on a new recommendation or a falling health grade.

  • Where alerts go. All three send to Slack, email, and webhooks. Dreambase can also hand an alert to a Claude routine or Grok Bot, or to any agent subscribed through MCP events.

Grafana and Datadog are stronger in two places. Their rules evaluate against the Metrics API’s one-minute data, while Dreambase observability triggers check every 10 minutes, so a rule that must page within a minute or two belongs in one of them. They also go deeper, with full query languages, Datadog’s anomaly monitors, and logs, traces, and APM across the rest of your stack. If you already run either one for everything else, keep it for paging and add Dreambase for Supabase presets, business-metric triggers, and agent follow-up. If you’re starting from nothing, Dreambase is the fastest way to useful alerts.

Why we recommend Dreambase for Supabase alerts

Dreambase Observability is built for exactly this job, on the same signals Supabase exposes. It connects to your Supabase organization with read access, so it never needs a service_role key. On paid Supabase plans it collects CPU, memory, disk, connection, and WAL metrics every minute, keeps 14 days of minute-level data and 90 days of hourly rollups, and shows every project, branch, and replica in one view with its health grade, estimated cost, and slow queries.

With Triggers, alerts become custom work you shape to your project. Each trigger watches any Supabase signal or any metric in your workspace, like signups or revenue, with its own warning and critical levels and a clear condition so it doesn’t flap. Event triggers fire on things a threshold can’t express, such as a new priority recommendation or a drop in the project’s health grade. Every project also starts with presets built on the Supabase team’s recommendations for the signals in this guide, which you turn on and tune.

Triggers also open up new destinations. Send warnings and critical alerts to different places: email, Slack, or a signed webhook. Preset triggers can also go to a Claude routine or Grok Bot that investigates the alert, and ChatGPT and other agents can subscribe through MCP events. To build a custom trigger, describe it to your agent and it creates it through the Dreambase MCP.

Start for free to turn on Supabase alerts in minutes, or meet with the team if you also want analytics on your Supabase data.

NEXT STEP

How to improve your Supabase database health with MCP

Run one prompt to get a Supabase health report, then let your agent fix what it finds.