# Alerts history

> Review every alert your Alert rules fired in Cloak Proxy, including ones grouped out of notifications, and jump straight to the request behind each one.

Source: https://docs.subcloak.com/cloak-proxy/insights/alerts-history/

The **Alerts** tab in Insights is the log of everything your [Alert rules](https://docs.subcloak.com/cloak-proxy/tools/alerts/) caught. Alert rules post a macOS notification when a matching request fails, slows down, returns a status code or contains some text, but notifications are grouped and easy to miss. This tab keeps every alert, with the time and the request, so you can go back and look.

*[Screenshot: The Alerts tab listing two alerts: Payments failing for POST api.example.com/v1/pay returning 503, and Slow search for a search request that took 3400 ms. Newest alerts first, each with the rule that fired and the request that triggered it.]*

## Review alerts

1. Open Insights with <kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>I</kbd> and click **Alerts**.
2. Read the list. The count at the top left shows how many alerts are kept.
3. Click **Show Request** on an alert to select that request in the main window.

Each alert shows:

| Part | What it shows |
|---|---|
| Time | When the alert fired, in your Mac's time format. |
| Rule name | The name of the Alert rule that fired. |
| Message | The method and full URL, then `→` and the status code, or `→` and the failure reason when there was no response, then the duration in milliseconds. For example, `POST https://api.example.com/v1/pay → 503 (812 ms)`. |

## Buttons

| Button | What it does |
|---|---|
| **Edit Alert Rules…** | Opens the [Tools window](https://docs.subcloak.com/cloak-proxy/tools/overview/) on **Alerts**, where you add and change rules. |
| **Clear** | Removes every alert from the history. It doesn't change your rules or the captured traffic. |
| **Add Alert Rule…** | Shown instead of the list when there are no alerts yet. Opens the Alerts tool so you can create your first rule. |

## How the history relates to notifications

- **Every match is recorded.** To avoid a flood, a rule posts at most one notification every 10 seconds; later matches are counted into the next notification as "+N more since the last alert". The history still lists every one of them.
- **The newest 500 are kept.** Older alerts drop off the end of the list.
- **It lasts while the app runs.** The history is kept in memory. Quitting Cloak Proxy empties it. **Clear Session** (<kbd>⌘</kbd> <kbd>K</kbd>) doesn't.
- **It isn't scoped.** The **All traffic** / **Current filter** menu doesn't affect this tab.
- **The request may be gone.** If you cleared the session after an alert fired, **Show Request** has nothing to select.

Each rule in the Alerts tool also has a **Recent** section with that rule's last 20 alerts. Clicking a notification jumps to the request too.

> **Turn on notifications:**
> Alerts are only shown as notifications if macOS allows them for Cloak Proxy. In the Alerts tool, click **Allow Notifications…** to ask for permission. The history on this tab works either way.

## Related

  - [Alerts](https://docs.subcloak.com/cloak-proxy/tools/alerts/): Create rules for 5xx errors, failures, slow responses, status codes and body text.
  - [Performance](https://docs.subcloak.com/cloak-proxy/insights/performance/): Slow and failing endpoints found automatically.
  - [Insights overview](https://docs.subcloak.com/cloak-proxy/insights/overview/): The Insights window and its tabs.
