> ## Documentation Index
> Fetch the complete documentation index at: https://docs.azvian.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alerts

> Get told by email, Slack or a signed webhook when a site goes down or recovers, or a certificate or domain is about to expire

Without an alert channel, **nothing is sent** when a site goes down. Set up at least one.

## Add a channel

Open **Alerts → Add a channel** and fill in:

| Field | Meaning |
| - | - |
| **Name** | For example "On-call email". |
| **Type** | **Email**, **Slack** or **Webhook**. |
| **Email address or URL** | An email address; a Slack incoming-webhook URL (Mattermost and Discord's Slack-compatible URLs work too); or any public `http(s)` URL that accepts a JSON `POST`. |
| **Signing secret** (webhook only, optional) | If set, each request is signed so your receiver can verify it came from your install. **Remove the current secret** clears it. |
| **Alert me when** | Tick the events you want: *Site goes down*, *Site recovers*, *SSL certificate expiring*, *SSL certificate renewed*, *Domain expiring*, *Domain renewed*. |
| **Channel is on** | Switch a channel off without deleting it. |

Press **Send test** on a channel to check it works. The list shows each channel's type, where it sends, which events it has and whether it is on, and below it **Recent alerts** with the result (**Sent** or **Failed**, with the error).

## Down alerts wait a few minutes

A single failed check is often a blip. A **down alert waits about 6 minutes** and only goes out if the site is **still down**, so one hiccup does not page anyone. The wait is set by `ALERT_DOWN_CONFIRM_MINUTES` in `.env` (default 6).

## Webhook payloads

A webhook channel receives a JSON `POST` for each event, with the header `X-Azvian-Event` (for example `down`, `recovered`, `ssl_expiring`; a test uses `test`) and this body:

```json theme={null}
{
  "event": "down",
  "occurred_at": "2026-11-02T09:41:07+00:00",
  "title": "Example is down",
  "summary": "…",
  "website": { "name": "Example", "domain": "example.com", "url": "https://example.com" },
  "details": { "Reason": "HTTP 503", "HTTP status": "503" }
}
```

The `details` object depends on the event (for example the reason and HTTP status for a down alert, or the expiry date, days left and issuer for a certificate).

### Verifying the signature

If you set a **signing secret**, every request also carries `X-Timestamp` (Unix seconds) and `X-Signature`: the hex **HMAC-SHA256** of `"{timestamp}.{raw body}"` using your secret. Recompute it on your side, compare, and **reject timestamps that are more than a few minutes old**.

```php theme={null}
$expected = hash_hmac('sha256', $_SERVER['HTTP_X_TIMESTAMP'].'.'.file_get_contents('php://input'), $secret);
$valid = hash_equals($expected, $_SERVER['HTTP_X_SIGNATURE'] ?? '')
      && abs(time() - (int) $_SERVER['HTTP_X_TIMESTAMP']) < 300;
```

### Safety rules

The webhook (and Slack) URL must point at a **public address**: addresses on your own network, such as `localhost`, `10.x.x.x` or the cloud metadata address, are refused when you save the channel and again before every send. Redirects are not followed. Treat the URL and the secret like passwords: they are stored encrypted.

## What does not go through alerts

* Alerts go to **your team**. Customers are informed through your [status page](https://docs.azvian.com/uptime-monitor/status-pages.md) and [subscriber emails](https://docs.azvian.com/uptime-monitor/subscribers.md).
* Alerts are suppressed during a [maintenance window](https://docs.azvian.com/uptime-monitor/maintenance.md).
* Email alerts need working outgoing mail and the queue worker. See [Installation](https://docs.azvian.com/uptime-monitor/installation.md#5-set-up-email).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.