Monitoring Supabase with Prometheus Alerting Best Practices
Supabase is a fast-growing open-source backend-as-a-service platform that provides a Postgres database, authentication, real-time subscriptions, and more. With distributed microservices architecture and essential stateful components like Postgres and Realtime servers, it's critical to monitor the health and performance of Supabase deployments using Prometheus. This blog highlights alert rules from the community-contributed template to help SREs, DevOps, and developers gain production-ready observability for Supabase services.
This alert checks for sustained 5xx error rates returned by the Supabase API service, indicating backend issues or misconfigurations affecting client experiences.
Tuning tips
Adjust the threshold (>1) based on expected error tolerance. For high-traffic environments, a small rate may be acceptable if tied to client retries. Tune the time window (5m) to reduce alert noise.
Supabase Postgres Instance Down
Operations blocking event loop
up{job="postgres"} == 0
Why this matters
Alerts when Prometheus cannot scrape the Postgres exporter, indicating service outage or connectivity issues to the core database.
Tuning tips
Add service-level annotations or silences during maintenance windows to avoid false positives. Ensure reliable Postgres exporter deployment.
Triggers when the Realtime server container exceeds 75% CPU usage averaged over five minutes. This may denote scaling issues with WebSocket connections.
Tuning tips
Adjust threshold based on CPU requests/limits in your environment. Monitor container resources to inform autoscaling policies.
This alert fires when available disk space for Supabase storage service falls below 10%, helping prevent outages due to full volumes.
Tuning tips
Adjust the 10% threshold based on persistence tier configurations and backup frequency. Monitor storage usage trends for proactive planning.
Supabase Edge Proxy Down
Service availability check
up{job="edge-proxy"} == 0
Why this matters
Fires when Prometheus cannot scrape the Edge Proxy, which may signal DNS, networking, or service orchestration issues affecting ingress.
Tuning tips
Verify if the exporter is properly configured. Ensure that service discovery in Prometheus matches the deployed job label.
Service availability check
Why this matters
Tuning tips
No setup steps
Service availability check
Why this matters
Tuning tips
Service availability check
Why this matters
Tuning tips
Quick Setup
1
2
3
4
5
Frequently Asked Questions
Are these alert rules production-ready?
Yes, these are community-developed alert rules designed for Kubernetes-based setups of Supabase components. Teams should tune thresholds and time intervals to suit their architecture.
How do I integrate these alerts with Alertmanager?
Save the alert rules in a YAML file and load them into Prometheus through the 'rule_files' directive in prometheus.yml. Use Alertmanager receivers to route alerts via email, Slack, or Opsgenie.
What metrics exporters do I need?
These rules assume exporters like Postgres exporter, node exporter, container metrics via Prometheus, and HTTP metrics are made available for Prometheus to scrape.
Can I use these alerts in non-Kubernetes environments?
Yes, with minor adaptations. Ensure the labels and target discovery match your underlying services and exporters.
Ready to Get Started?
Start monitoring your Supabase services today with battle-tested Prometheus alert templates from the community. Get started by downloading the Supabase alert rules at https://github.com/DrDroidLab/prometheus-alert-templates/blob/master/supabase