Alert Conditions
The difference between measurement-based and event-based alerts.
When you create an alert, the first big choice is what should trigger it. rabbit | iot offers two kinds of condition.
Measurement alerts
A measurement alert watches a device's readings and fires when a value crosses a limit you set. You define three things:
- Metric — which reading to watch (e.g. Temperature).
- Comparison — how to compare the reading to your limit.
- Threshold — the number to compare against.
The available comparisons are:
| Comparison | Fires when the reading is… |
|---|---|
| Greater than ( > ) | strictly above the threshold |
| Greater than or equal ( ≥ ) | at or above the threshold |
| Less than ( < ) | strictly below the threshold |
| Less than or equal ( ≤ ) | at or below the threshold |
| Equal to ( = ) | exactly the threshold |
| Not equal to ( ≠ ) | anything other than the threshold |
Example: Temperature greater than 30 fires whenever a reading above 30 °C arrives.
A measurement alert is only checked when a new reading arrives. If the device stops reporting, there's nothing to check — which is exactly what event alerts are for.
Event alerts
An event alert fires when something happens to the device rather than when a number crosses a line. Instead of a metric and threshold, you choose an event type to watch for. The most common are:
- Device offline — the device stopped reporting within its expected window.
- Device online — the device recovered, or reported for the very first time.
This is the right choice for "tell me if a sensor goes dark", which a measurement alert can't catch.
For complete peace of mind, pair them: a measurement alert for value too high and an event alert for device offline. Together they cover both "the reading is bad" and "there are no readings at all".
Which should I use?
| You want to know when… | Use |
|---|---|
| a temperature, level, or other number crosses a limit | Measurement alert |
| a door opens or a switch turns on | Measurement alert (on the on/off metric) |
| a device stops reporting / comes back | Event alert |

