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:
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>.- Console
- API
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
- Console
- API
- Go to Alarms > Definitions and click New definition.
- In the New alarm dialog, choose A value crosses a limit and click Continue. The editor opens with the
thresholdkind selected. - Under What to call it, enter the Name
High temperature. Change the generated Key tohigh_temp. - Set Priority to High.
- Under What to watch, pick your dataspace in Dataspace.
- In Query, enter the SQL below. Replace the read view with yours.
- Set Fires when to
event.temperature > 80and Resolves when toevent.temperature < 75. - In One alarm per, replace
device_idwithsource_id. - 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.
- Click Save and start watching.
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.
- Console
- API
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:
- Console
- API
- After you save, the Console opens the definition. In the Notifications card, click Open Notifications.
- In Send to, choose Email · recipients you enter and enter the recipient address.
- Under When, keep Alarm opens and Alarm resolves selected. Someone acknowledges is optional.
- Under Which alarms, check that High temperature is selected.
- 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:- On the first evaluation that sees a reading above 80, Golain opens an instance for that
source_idwithcondition_statepending. - When the condition has held for 60 seconds, the instance moves to
firing. - The Alarm opens email is sent.
6
See it on the Board
- Console
- API
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.
7
Acknowledge it
Acknowledging records that someone has seen the alarm. It does not resolve it.
- Console
- API
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:- The instance moves to
resolvedandprocess_statebecomesnormal. - It leaves the Board and the
/alarm-instances/activelist. - The Alarm resolves email is sent.
- Because you already acknowledged it, the instance closes on the following evaluation and
closed_atis set.
- Console
- API
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.