From 733dced3f76416319fe62d1f9856e8aabc57db36 Mon Sep 17 00:00:00 2001 From: Chris Gwilliams <517923+encima@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:30:56 +0200 Subject: [PATCH] initital draft of alerting example docs --- .../monitoring-troubleshooting/alerting.mdx | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 apps/docs/content/guides/monitoring-troubleshooting/alerting.mdx diff --git a/apps/docs/content/guides/monitoring-troubleshooting/alerting.mdx b/apps/docs/content/guides/monitoring-troubleshooting/alerting.mdx new file mode 100644 index 00000000000..7aa699dacf4 --- /dev/null +++ b/apps/docs/content/guides/monitoring-troubleshooting/alerting.mdx @@ -0,0 +1,41 @@ +--- +id: 'alerting' +title: 'Alerting' +description: 'Alerting on your Supabase project' +--- + +On the platform, Supabase will send emails to warn about different metrics that may need your attention. In addition, you will likely want to set up additional alerting for you and/or your team. + + +## Email Alerts + +* Exhausted: + * Disk IO + * CPU Usage + * RAM Usage +* Disk Resized + + +## Prometheus Alerting + + + +This section assumes that you have completed and configured collecting metrics for your project using the [Metrics docs](/docs/guides/monitoring-troubleshooting/metrics). + + + +When you have metrics reported into your own observability stack, you can set alerts based on your own needs. In this section, some example alerts are defined, as well as what the individual metrics mean. +Alerts can be configured in Grafana using [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/). + +### Direct Database (Client) Connections Exceeded + +Your maximum database connections are set depending on your [Compute size](/docs/guides/platform/compute-and-disk). +In this example, we are creating an alert to notify when the number of direct database connections grows by more than 100 in the time window of one minute. + + + +``` +rate(pg_stat_database_num_backends{suapabase_project_ref="PROJECT_REF"}[1m])>100 +``` + +