# Get alerted before a limit is crossed (https://logable.app/docs/guides/alerts/get-alerted-before-a-limit-is-crossed)

Set a threshold rule on a device metric, choose who is told and how, and clear it when the value recovers.



A rule watches one metric on one device or stream. When the value crosses a limit you set, Logable raises an alert and tells the people you choose.

## Build the rule [#build-the-rule]

1. Open **Triggers** and select the **Rules** tab.
2. Select **Create Trigger**.
3. Give the rule a **Name** your team will recognise, for example "Raw Meal Silo low level".
4. Set **Target** to **Device** and pick the device.
5. Pick condition type **Threshold**.
6. Choose the **Metric**, the **Operator**, and the **Threshold value**.
7. Turn on **Recovery condition** if you want the alert to clear itself when the value crosses back past the trigger.
8. Set "Only alert if the condition holds for (minutes)" to how long the value must stay past the limit before Logable raises the alert. Logable has not seen enough data from a new device yet to suggest timings, so this starts as a number of minutes. Once Logable has learned the device's cadence, the field becomes a count of readings, with Straight away as the default.
9. Set **Severity** to Info, Warning, or Critical. Critical is the only severity that gets through quiet hours.
10. Choose the **Alert behaviour**: &#x2A;*Active alert (track & resolve)** or **Notify once**.
11. Choose **Repeat**: **Tell me once, until it clears**, **Every N minutes**, or **Keep reminding me until I acknowledge**.
12. Pick **Delivery channels**: Web, Email, Push.
13. Pick **Recipients**: the organization default, specific roles, or specific members.
14. Select **Save**.

<Figure src="/docs/captures/rule-threshold.webp" alt="The threshold rule form with metric, operator, threshold value and recovery condition set for a device" width="1344" height="1620" sizes="(min-width: 1280px) 860px, (min-width: 640px) 90vw, 100vw" caption="A threshold rule on a device metric." />

## When it fires [#when-it-fires]

An alert that fires shows up on the **Active** tab. Acknowledge it to tell your team the alert has been seen. Resolve it to close it. If the rule has a recovery condition, Logable closes the alert on its own once the value crosses back.

<Figure src="/docs/captures/alerts-active.webp" alt="The Active tab listing a fired alert, acknowledged, with a Resolve action" width="1400" height="681" sizes="(min-width: 1280px) 860px, (min-width: 640px) 90vw, 100vw" caption="An active alert, ready to acknowledge or resolve." />

## Escalate when nobody acknowledges [#escalate-when-nobody-acknowledges]

A rule can escalate to a policy under "When nobody acknowledges the alert". The policy notifies further people in stages if the alert sits unacknowledged. Build the policy on the Escalation tab, which needs two visible members in your organization before it becomes available.

## Next steps [#next-steps]

* [Use a ready-made preset](/docs/guides/alerts/use-a-ready-made-preset)
* [Send alerts to a webhook](/docs/guides/alerts/send-alerts-to-a-webhook)
* [Understand roles](/docs/guides/organizations/understand-roles)
