---
title: "Configure metric alerts"
description: "Create metric alert rules, assign them to servers, and set thresholds and notification delivery. Learn when a rule fires and how recovery closes its alert."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# Configure metric alerts

## Metric alerts

Metric alerts are also part of the Metrics extension—enable it as described in [Monitor performance metrics](/use/metrics/). A rule watches one metric and raises an alert when it crosses a threshold you set.

### How rules fire

Alpacon checks every rule about once a minute, using the data the agent has already sent. A rule fires when the value has stayed past the threshold for the duration you set, or on the first sample if the duration is zero. It clears only when the value comes back past the recovery threshold, or past the threshold itself if you didn't set one—so a value hovering right at the line doesn't flip the alert on and off.

A positive duration also has a floor: it has to span at least two collection intervals for the target you're watching, since anything shorter can't reliably hold a second sample and would behave like an instant rule while reading as a sustained one. `0` (fire on the first sample) isn't affected—see [what a rule can carry](#what-a-rule-can-carry) for where duration is set.

The default CPU usage and memory usage rules that come with every workspace need the value to stay at or above 80% for about 5 minutes before they fire, and they clear once it drops back below 75%. The default disk usage rule fires as soon as one sample reaches 80%, and clears below 78%.

You can alert on a value that's too high or too low. For disk usage, disk I/O, and network rules, each disk or interface raises its own alert, and you can limit a rule to just one device instead of every one the server reports.

A rule can also alert when a server stops reporting a metric for longer than you set. Alerts stay open while a server is silent—they don't clear just because the data stopped.

Each rule also carries a severity—critical, warning, or info—shown on the alert it raises, and severity decides whether that alert can email or post to Slack. See [what a rule can carry](#what-a-rule-can-carry) for how each one behaves.

### Attach an alert to a server

1. Open **Metrics** from the workspace app
2. Select the server and go to the **Rules** tab
3. Click **Assign rule**
4. Select from workspace-created alerts

Alerts have to be created in the workspace first, on the **Metric alerts** screen of the Metrics app.

### Add rule

Created on the **Metric alerts** screen of the Metrics app.

1. Click **New rule**
2. Pick the target. For CPU usage, memory usage, and disk usage, the form opens with the values of the default rules every workspace starts with. For disk I/O and network targets, enter the threshold yourself
3. Change what you need under **Condition**, **Scope**, **Delivery**, and **Advanced**
4. Save

Every field is listed in [what a rule can carry](#what-a-rule-can-carry).

The list also says, next to its own description, how many servers have no performance rule attached—as a link straight to them—so long as there's at least one.

**Note:** Only one default rule can be created per target

**What are default rules?** Rules automatically applied when new servers are registered. Every workspace starts with three: CPU usage and memory usage fire once the value stays at or above 80% for about 5 minutes and clear below 75%, and disk usage fires on the first sample at or above 80% and clears below 78%.

### Edit rule

Click a rule's name to open its own page, which has two tabs. **Rule** says what the rule does in one sentence, then repeats it field by field, and **Update** opens the same form **New rule** uses. **Applied servers** lists every server this rule is attached to—a server exempted from the rule by its own [override](#per-server-overrides) still appears there. The **Actions** menu on the list row edits and deletes without leaving the list.

- Cannot delete the only default rule for a target

### Who can edit or delete a rule

A workspace admin can edit or delete any rule. So can anyone whose role carries rule-editing and rule-deleting rights—the built-in `operator` role has both, `member` does not. Creating a rule doesn't give its creator any special access to it by itself.

An admin can also give a specific person, group, or service token the right to edit and delete just one rule, without changing their overall role—ask a workspace admin if your role doesn't already cover a rule you need to manage. This grant can't be made from the rule's own page yet.

Some older rules still let the person who created them edit and delete that one rule, from a grant Alpacon made automatically at creation; Alpacon is cleaning those up over time.

The default CPU usage and memory usage rules can be edited by anyone with rule-editing rights, the same as any other rule. The disk usage rule that comes with every workspace is different: only a workspace admin can edit it, turn another rule into it (or it into an ordinary rule), add, change, or remove a [per-server override](#per-server-overrides) on it, or detach it from a server. Attaching it back to a server isn't restricted this way, and anyone who can already see the rule can still preview it.

No default rule, including the disk usage rule, can be deleted while it's still marked as default.

### What a rule can carry

The console form sets all of these, grouped as **Condition**, **Scope**, **Delivery**, and **Advanced**. The same fields are available through the [alert rules API](/reference/api/metrics/rules/):

| Field | What it does | Validation |
|---|---|---|
| Name | Identifies the rule | Must be unique in the workspace |
| Target | Which metric the rule watches: CPU usage, memory usage, disk usage, disk I/O (peak or average read/write), or network traffic (peak or average input/output, bps or pps) | — |
| Threshold | The value that raises the alert | — |
| Direction | Alert when the value is at or above the threshold, or at or below it | — |
| Duration | How long the value has to stay past the threshold before the alert fires | `0` fires on the very first sample; a positive value must be at least two collection intervals for the target |
| Recovery threshold | The value the metric has to come back to before the alert clears | Must be on the recovering side of the threshold: below it when the Direction is at or above, above it when the Direction is at or below. Leave it empty and the threshold itself clears the alert |
| No-data window | Raise a separate alert if this metric stops arriving for longer than this | Must be at least as long as how often this metric is collected, and at most 24 hours |
| Device | Limit the rule to one disk or network interface | Only for disk usage, disk I/O, and network rules—CPU and memory apply to the whole server and can't be scoped to a device |
| Severity | The severity the raised alert carries, and which of the two destinations below can actually fire: critical can email and post to Slack, warning can only post to Slack, info reaches neither | Defaults to warning |
| Email destination | Who the alert email goes to, narrowed from everyone who can already see the server: everyone who can see it, workspace admins only, server group members and the owner, or no individual alert email. Only takes effect on a critical-severity rule | Defaults to everyone who can see the server |
| Slack channel post | Whether a raise and its resolution post to the workspace's connected Slack channel | Defaults to on |
| Default rule | Automatically attached to every server registered afterward | Only one default rule per target and device |

Severity decides which of the two destinations above can actually fire—the fields themselves only say who or what within that. A rule set to **Critical** severity sends mail and posts to Slack exactly as those two fields say. A rule set to **Warning** severity (the default) never emails, whatever the email destination says—it posts to Slack only if that field is on. A rule set to **Info** severity does neither. Whatever the severity, every alert is still recorded in the console and your notification bell, reaches any webhook subscribed to the rule's events, and is included in the hourly [open alert digest](/reference/notifications/#open-alert-digest) sent to workspace admins while it's open. Set a rule to critical if it needs to keep emailing.

A server can also depart from a rule's threshold, recovery threshold, or duration on its own, or be exempted from the rule entirely—see [Per-server overrides](#per-server-overrides). The email and Slack destinations above, and severity, are workspace-wide only.

### Per-server overrides

A server can depart from a workspace rule without changing it for everyone else: give that server its own threshold, recovery threshold, or duration, or exempt it from the rule entirely. The disk usage rule that comes with every workspace is the one exception—see [Who can edit or delete a rule](#who-can-edit-or-delete-a-rule).

Set it on the server's **Rules** tab: open the row's actions and choose **Set per-server override**. The form opens holding the rule's own values, so what you see is what the server does today. A box left at the rule's value keeps that field following the rule, and a later change to the rule still reaches this server; type a different number and only that field departs. Clear **Apply this rule to this server** to exempt the server from the rule entirely, and **Go back to the rule's values** removes the override.

The **Applied** column on that tab says which of the three each rule is in: **Rule values**, **Overridden**, or **Not applied**.

The same settings are available through the [rule overrides API](/reference/api/metrics/rule-overrides/), for any server you can manage.

### Receiving alerts

A monitoring alert—whether it's a threshold breach or a metric going silent—shows up in the console's alert list and on the dashboard, and reaches any subscribed webhook, the moment the rule fires. Email and the Slack post (if connected) wait a little longer—about two minutes—to confirm the condition is still true before interrupting anyone. If it clears before then, no email or Slack message goes out at all for that alert: the alert still shows as resolved in the console's alert list, and a webhook subscribed to the resolved event still receives it.

Once an alert has stood long enough to be emailed or posted to Slack, where it goes depends on the rule's severity. A **Critical** alert reaches whoever the rule's email destination names, and, if the rule's Slack channel post is on, the workspace's connected Slack channel; several alerts that fire together are combined into one summary. A **Warning** alert—the default for a new rule—never emails, whatever its email destination says; it posts to Slack only if that setting is on, and either way it appears in the hourly [open alert digest](/reference/notifications/#open-alert-digest) sent to workspace admins while it's open. An **Info** alert reaches neither channel. A critical rule emails everyone who can see the server by default, and can be narrowed to workspace admins only, the server's group members and owner, or no individual alert email—see [what a rule can carry](#what-a-rule-can-carry) for those two fields, and set a rule's severity to critical if you need it to keep emailing. See [How you're notified](/use/servers/monitor/#how-youre-notified) for who counts as everyone who can see the server, why the email names you, and how to turn off your own email.

For a single alert, the email and Slack subject carry what the rule saw—for example, `CPU usage 92% ≥ 80% for 5 minutes on web-01` for a rule with a duration set, or `CPU usage stopped reporting on web-01` for a metric that's gone silent. Several alerts fired together get a short summary subject instead.

When an alert you were emailed or Slack-notified about clears, the same people get a follow-up saying why: the metric recovered, the server started reporting data again, the rule changed or no longer covers the server, the server was exempted from the rule, or the server is no longer being managed.

A webhook, or any other notification channel, can subscribe directly to a rule crossing and clearing instead of reading email or Slack, with neither wait. See [Metric threshold events](/reference/mcp/tools/events/#metric-threshold-events) for the two event types and their payload.

### Alert history

**Alert history** in the Metrics app lists the metric alerts that have already cleared: what fired, its **Rule**, on which server, its severity and device, when it was raised and when it cleared, how long it stood, and its **Cause**—why it closed. The **Rule** column links to the rule's own page—see [Edit rule](#edit-rule)—and shows the alert's condition, **Threshold** or **Metric went silent**, underneath the name; if the rule was deleted, or none was recorded, it reads **No rule** instead of a link. Cause uses the same values as the [`cause` field on a resolved event](/reference/mcp/tools/events/#metric-threshold-events): the metric recovered, the server started reporting again, the rule was deleted or the server was detached from it, the rule changed or no longer covers this server or device, a per-server override exempted the server, the server is no longer managed, no rule covers it anymore, a per-device alert superseded it, the device is no longer reported by the server, or the condition no longer applies for a cause that couldn't be more specifically identified. An alert resolved before this column existed shows no cause. Alerts still standing are on the dashboard rather than here. The rule's own page links back here too, with an **Alert history** link that filters this list to just that rule.

The **Delivered** column shows what the alert's raise actually sent. A channel that delivered gets its own chip—**Email · 3**, or **Slack** with no count, since a channel post addresses a room rather than a list of people. A channel whose send failed shows **Email · Failed to send** (or **Slack · Failed to send**) instead, with a tooltip noting that the send was attempted and failed. A raise that sent nothing shows one muted chip instead, with a tooltip naming why: it's still inside its hold, the condition cleared before the hold ended, the rule's own destinations kept it off every channel, or it was dispatched but no delivery was recorded. An alert type that never sends an interrupt shows **Not recorded**.

History rows are kept for 30 days after the alert resolves; open alerts are never purged, however long they've stood. Metric alerts raised by an extension rule—anything beyond the seeded core disk-usage rule—are left out of this list, the dashboard, and the digest while the Metrics extension is off. The core disk-usage rule's own alerts stay visible either way.

Click **Filter** to narrow the list to one **Rule**, or use **Date range** to narrow it to when the alert was raised—Today, Last 7 days, Last 30 days, or a custom range.

Source: https://docs.alpacax.com/use/metrics/rules/
