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

# Alerts

> Get a Slack message or a signed webhook when a named event spikes, or when it stops, in a five-minute window.

Alerts notify you when something important happens, for example a spike in signups, a burst of errors that you track as events, or a game build that stops sending events.

An alert counts **one named event** in each completed five-minute UTC window. Filters can narrow the events that count. When the count meets the condition, ManaLens sends a message to the alert's destination. Only custom events count; page views do not.

## Create an alert

1. Open your project and go to **Settings**, then the **Alerts** tab.

2. Under **New event alert**, set:

   | Setting | Description |
   | - | - |
   | **Alert name** | A descriptive name, such as "Signups spiking" |
   | **Event name** | The exact event name, such as `signup_completed`. The field suggests event names from your data. |
   | **Condition** | **At least** or **Fewer than** |
   | **Events in 5 min** | The count for one five-minute window, from 1 to 1,000,000 |
   | **Filters** | Optional. Up to 10 conditions on the event, such as country, app version or an event property. All of them must match. |
   | **Destination** | **Slack** or **Webhook (HTTPS)** |

3. Enter the destination URL:
   * **Slack:** an incoming webhook URL that starts with `https://hooks.slack.com/services/`.
   * **Webhook:** any public HTTPS URL.

4. Click **Create alert**.

For a webhook, the page shows a **signing secret** (`whsec_...`) once. Copy it and store it in your receiver. Use it to [verify each request](https://docs.manalens.dev/api/alert-webhooks.md#verify-the-signature).

## Conditions

* **At least N**: the alert fires for each window with N or more matching events. Use it for spikes.
* **Fewer than N**: the alert fires for each window with fewer than N matching events. A window with no events fires. Use it to learn when a build or a feature stops sending an event. "Fewer than 1" means "no events at all".

A "fewer than" alert:

* starts with the first full window after you create it. It never looks at older windows.
* does not fire before your project receives its first event.
* checks a window two minutes after the window ends, so events that are still on their way count.
* fires once per window while the count stays low. Pause the alert while you fix the problem.

## Filters

Filters use the same fields and operators as the report filter menu: context fields (country, device, UTM fields and others), app fields (platform, storefront, app version, build, engine), channel, page path, and event properties (`properties.<key>`). An empty channel counts as **Direct**. A missing or `null` property counts as empty, so **is not set** matches it.

To add a filter, choose a field, an operator and a value, then click **Add filter**. The value field suggests values from your data. Click the **x** on a filter to remove it.

## Edit an alert

Click **Edit** in the **Alert rules** table. The form opens with the alert's settings. You can change the name, event, condition, count, filters and destination.

* The destination URL is never shown. The field shows only the host and the last four characters. Leave it empty to keep the current destination.
* A new webhook URL gets a new signing secret. The page shows it once.
* A change to the event, condition, count, filters or destination starts again at the next full window. Older windows are not checked again.
* When you change the destination, deliveries that are still waiting for the old destination are not sent.
* When you change only the rule, waiting deliveries are still sent. Each one describes the rule it fired under.

## Manage alerts

The **Alert rules** table shows each alert's name, event, condition, filters, destination, status and last delivery.

* **Edit** opens the alert in the form.
* **Send test** sends a test message through the same path as a real alert. You can send five tests per minute per alert.
* **Pause** and **Resume** stop and restart an alert.
* **Delete** removes the alert.

Creating, editing, pausing, test sends and deleting are recorded in the workspace audit log. The audit log never contains the destination URL or the secret.

## Delivery

* Delivery is **at least once**. A failed delivery is retried with backoff, up to five attempts. A webhook receiver can drop duplicates by the payload `id`.
* Slack messages are plain text. They name the condition and the filters. Webhooks receive [signed JSON](https://docs.manalens.dev/api/alert-webhooks.md) with the same information.
* Destination URLs and signing secrets are stored encrypted.
* The URL must be public HTTPS. Private, loopback and cloud metadata addresses are refused, redirects are not followed, and a request times out after 5 seconds.

## Ideas

| Alert | Event | Condition | Filters |
| - | - | - | - |
| Signup spike | `signup_completed` | At least 10 | None |
| Checkout errors on one build | `checkout_failed` | At least 5 | App version is 1.4.0 |
| Build stopped sending heartbeats | `session_heartbeat` | Fewer than 1 | Platform is windows |
| Paid traffic dried up | `waitlist_joined` | Fewer than 3 | Channel is Paid Search |


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