Alarms
An alarm is what OpenGate raises when a rule detects something worth a human’s attention: a device that stopped reporting, a value out of range, an identification conflict. This API is how a back-office application finds them, counts them, and records that somebody dealt with them.
The alarm life cycle
stateDiagram-v2
direction LR
[*] --> OPEN: a rule raises the alarm
OPEN --> ATTENDED: action ATTEND
OPEN --> CLOSED: action CLOSE
ATTENDED --> CLOSED: action CLOSE
CLOSED --> [*]
| Status | Meaning |
|---|---|
OPEN |
The alarm is active |
ATTENDED |
An operator is dealing with it |
CLOSED |
The alarm is closed |
Two more attributes tell you how much it matters:
| Attribute | Values |
|---|---|
severity |
INFORMATIVE (only informative) · URGENT (needs attention soon) · CRITICAL (critical for service operation) |
priority |
LOW · MEDIUM · HIGH |
Endpoints
| To | POST to |
|---|---|
| Search alarms on any entity | /north/v80/search/entities/alarms |
| Search alarms on devices | /north/v80/search/entities/devices/alarms |
| Search alarms on subscriptions | /north/v80/search/entities/subscriptions/alarms |
| Count instead of list | The same three URLs with /summary |
| Attend or close alarms | /north/v80/alarms |
Searches follow the standard query language: filter, select, sort, group and
limit, with results in JSON by default or CSV through header options.
Finding alarms
Fields you can filter and sort on
| Group | Fields |
|---|---|
| Identity | alarm.identifier · alarm.name · alarm.rule · alarm.description |
| Classification | alarm.severity · alarm.priority · alarm.status |
| Where | alarm.organization · alarm.channel · alarm.entityIdentifier · alarm.subEntityIdentifier · alarm.resourceType |
| Opening | alarm.openingDate |
| Attention | alarm.attentionDate · alarm.attentionUser · alarm.attentionNote |
| Closure | alarm.closureDate · alarm.ClosureUser · alarm.closureNote |
Everyday queries follow from those: everything still open and critical, everything a given operator attended, everything raised on one device last week.
Counting alarms
The /summary endpoints answer how many, which is what a dashboard needs. An empty filter summarizes
everything:
The response counts alarms and breaks them down by group:
Only four fields can group a summary
Summaries group by alarm.name, alarm.rule, alarm.status and alarm.severity. Any other field
returns 400 Bad Request.
Attending and closing
Alarms are not deleted, they are moved along their life cycle. One request handles a batch, and the notes
field records why — which is what makes the alarm history auditable afterwards:
| Field | Holds |
|---|---|
action |
ATTEND or CLOSE |
alarms |
The identifiers to act on, one or many |
notes |
The reason, stored as attentionNote or closureNote |
The user performing the action is recorded in attentionUser or ClosureUser, with its timestamp, so you
can query later who handled what.