# Alerts

Deplane watches every app around the clock and tells your team when one goes down, returns errors, slows down, or fails to deploy.

## What Deplane alerts on

Every rule is on for a new team. Change them in the dashboard on **Alerts**.

| Alert | When | Ends when |
|---|---|---|
| App down | An app that should run has no ready instance for 2 minutes, for example because it keeps crashing | An instance is ready again |
| Errors | More than 5% (you choose) of at least 20 requests fail with a 5xx status over 5 minutes | The rate is clearly below your threshold again (under 80% of it), or the app gets no traffic |
| Slow | The p95 response time is above 2000 ms (you choose) in each of the last 5 minutes with traffic | Every recent minute with traffic is below it again |
| Deploy failed | A build fails, or a new release does not start | (a one-time alert) |
| Rolled back | A release's errors spiked in its first 10 minutes live and Deplane rolled it back ([automatic rollback](cli.md#automatic-rollback)) | (a one-time alert, always sent) |
| Disk backups are behind | An app's [disk](disks.md) is at least 36 hours old and no backup of it has finished in the last 36 hours (not raised while the app has never started with the disk) | A backup of the disk finishes (always on) |
| Custom domain no longer points here | A connected [custom domain](domains.md)'s DNS stopped pointing at the app. Deplane keeps serving it for 7 days, then stops | DNS points at the app again, or Deplane stopped serving the domain (always on) |
| Custom domain stops within a day | The same domain, one day before Deplane stops serving it | As above (always on) |
| Custom domain taken over | Another Deplane team proved one of the app's connected domains with its own TXT record, so the domain now serves that team's app; says what to check | (a one-time alert, always sent) |
| Template withdrawn | The app was deployed from a template Deplane no longer offers because its first visitor became the owner; says what to check | (a one-time notice, always sent) |

Each app has at most one open alert of each kind, so a long outage is one alert, not one per minute. With too little traffic to judge, an open alert stays open. If an alert comes back within 15 minutes of ending, it shows on the dashboard but is not sent to your channels again. Pull request previews never alert. An alert ending is announced too.

## Where alerts go

Alerts always appear on the dashboard's **Alerts** page, with the number of open ones next to Alerts in the sidebar, and in `deplane alerts`. Add up to 10 channels:

- **Slack:** in Slack, add the Incoming Webhooks app to a channel and paste its `https://hooks.slack.com/services/…` URL.
- **Discord:** in the channel's settings, Integrations, Webhooks, create one and paste its `https://discord.com/api/webhooks/…` URL.
- **Webhook:** any public HTTPS address. Deplane POSTs JSON (`title`, `detail`, `app`, `kind`, `state`: firing, resolved or event, `url`, `occurred_at`) with the header `X-Deplane-Signature: sha256=<HMAC-SHA256 of the body with the channel's secret>`. The secret is shown once, when you add the channel: check the signature before trusting a request.
- **Email is not available yet.** Deplane's email sending is not set up, so an email channel would only be logged and never delivered. Use Slack, Discord or a webhook to be told today.

Use **Send test** to check a channel. The dashboard shows whether the last delivery arrived and, if not, why.

Webhook addresses are stored encrypted and shown masked. Deplane only delivers to public internet addresses and does not follow redirects.
