Skip to main content
This walkthrough builds one complete alarm. You create a threshold rule called High temperature (key high_temp) that reads a timeseries dataspace of temperature readings. It fires when a device’s latest reading stays above 80 for 60 seconds, and resolves when the reading drops below 75. Then you subscribe an email address, trigger the alarm, acknowledge it on the Board, and watch it resolve. Every step shows the Console path and the equivalent API call.

Prerequisites

For the API tabs, set these variables:
Every request sends Authorization: Bearer $TOKEN and ORG-ID: $ORG_ID. Successful responses use the envelope {"ok": 1, "data": …}. A single object comes back as data.item and a list as data.items.

The rule you will build

Walkthrough

1

Find the dataspace read view

Threshold SQL reads from the dataspace’s read view, not from the dataspace name. The read view’s name looks like ds_read_<hex>.
You don’t need to look it up separately. In the alarm editor, pick the dataspace in Dataspace. The hint below the field then shows Read view ds_read_…, and the SQL editor label shows SQL · ds_read_…. Copy that name into your query.If the hint says the dataspace has no read view yet, it has not received data. Send some readings first.
2

Create the definition

  1. Go to Alarms > Definitions and click New definition.
  2. In the New alarm dialog, choose A value crosses a limit and click Continue. The editor opens with the threshold kind selected.
  3. Under What to call it, enter the Name High temperature. Change the generated Key to high_temp.
  4. Set Priority to High.
  5. Under What to watch, pick your dataspace in Dataspace.
  6. In Query, enter the SQL below. Replace the read view with yours.
  7. Set Fires when to event.temperature > 80 and Resolves when to event.temperature < 75.
  8. In One alarm per, replace device_id with source_id.
  9. Under Timing, set Evaluate every to 60 s and Must hold for to 60 s. Set Keep firing for to 0 so the alarm resolves as soon as a reading drops below 75.
  10. Click Save and start watching.
The query must follow these rules, or the save is rejected:
argMax(temperature, event_ts) picks each device’s latest reading in the window. Using max(temperature) instead would keep the alarm firing until the hot reading leaves the 5-minute window.
3

Confirm it is active

New definitions are active by default and start evaluating as soon as you save them. There is no separate activation step.
In Alarms > Definitions, the Status column shows Evaluating. If it shows Deactivated, open the definition and click Activate.
4

Subscribe an email address

Definitions decide when an alarm fires. Notification subscriptions decide who hears about it. Subscribe to two alarm events:
  1. After you save, the Console opens the definition. In the Notifications card, click Open Notifications.
  2. In Send to, choose Email · recipients you enter and enter the recipient address.
  3. Under When, keep Alarm opens and Alarm resolves selected. Someone acknowledges is optional.
  4. Under Which alarms, check that High temperature is selected.
  5. Click Create subscription.
Only project-scoped subscriptions can target individual definitions. Org- and fleet-scoped subscriptions receive every alarm.
5

Trigger the alarm

Publish readings with temperature above 80 from one device, and keep them coming for more than a minute.Here is what happens:
  1. On the first evaluation that sees a reading above 80, Golain opens an instance for that source_id with condition_state pending.
  2. When the condition has held for 60 seconds, the instance moves to firing.
  3. The Alarm opens email is sent.
If the reading drops back to 80 or below before the 60 seconds pass, the pending instance closes. No notification is sent.
6

See it on the Board

Go to Alarms > Board. The High temperature alarm appears with a P2 chip. Unacknowledged alarms sort above acknowledged ones at the same priority. Click the alarm name to open its detail page, which shows its labels and the Fires when condition.
The instance’s trigger_value is read from a result column named value. To fill it, also select the reading as value, for example argMax(temperature, event_ts) AS value.
7

Acknowledge it

Acknowledging records that someone has seen the alarm. It does not resolve it.
Click Acknowledge on the alarm’s row on the Board, or on its detail page. The alarm stays on the Board while it is still firing. It now shows under the Acked filter.
8

Watch it resolve

Send readings below 75. On the next evaluation:
  1. The instance moves to resolved and process_state becomes normal.
  2. It leaves the Board and the /alarm-instances/active list.
  3. The Alarm resolves email is sent.
  4. Because you already acknowledged it, the instance closes on the following evaluation and closed_at is set.
Readings between 75 and 80 do not resolve the alarm. This deadband stops it from flapping around the limit.
On the Board, click the History filter to see the resolved alarm.
If nobody acknowledges a resolved alarm, it stays open in resolved until someone does. That way, an alarm that cleared on its own still gets reviewed.

What you built

Next steps

Kinds and conditions

Event, threshold, and staleness rules. SQL, CEL, timing, and no-data handling.

Notifications

Other channels, re-notify, escalation, and work orders.

Silences and shelving

Hide nuisance alarms for a set time without losing them.

API reference

Every alarm endpoint, with request and response shapes.