Alarm report
An alarm report for a chosen entity and time window: counters for total, active, cleared and unacknowledged alarms, average, median and longest duration, the severity mix, and the most frequent alarm types and devices. Every alarm is listed in a sortable, filterable table with a timeline column that draws each alarm on one shared axis, so overlapping incidents line up. A row opens a detail panel, alarms can be acknowledged or cleared from the row, and the filtered rows export to CSV.
Alarms report
Reports every alarm of the selected entity over the dashboard time window: how many there were, how long they lasted, which types and devices produced them, and what is still open. A statistics band sits above a sortable table, and each row opens a detail panel with the alarm’s own timeline.
Features
- Four statistics cards — counts, duration, severity mix, most frequent types and devices
- Timeline column that draws every alarm on one shared time axis, so overlapping alarms line up
- Detail panel per alarm: its position on the report axis, the started / acknowledged / cleared stamps, the assignee, and the alarm details as labelled fields
- Acknowledge and clear an alarm from its row, with either button switchable off
- CSV export of the rows currently shown — filtered, in the current sort order, all pages
- Severity, state and acknowledgement filters that are built from the platform alarm filter, so they can only narrow inside it
- Adapts to the card: columns give way as it narrows, and the whole card scrolls when it is too short for a table
- Follows a light or a dark dashboard theme without any configuration
What it displays
Statistics band — four cards, each switchable off:
| Card | Shows |
|---|---|
| Alarms | Total, and how many are active, cleared and unacknowledged, with their share |
| Average duration | Average, median and longest duration of cleared alarms, plus open alarms as a separate figure |
| Severity mix | A proportional bar and a count per severity, listing only severities that occur |
| Most frequent | The top alarm types and the top devices, ranked by count |
Alarm table — one row per alarm: severity, type, device, start time, timeline, duration and acknowledgement time. Rows sort by any column and search by type or device name.
Detail panel — clicking anywhere on a row opens the alarm on the report axis with a notch where
the acknowledgement fell, which the narrow lane in the row cannot fit. Below it, started,
acknowledged and cleared are spelled out, with a hollow marker and plain words for anything that has
not happened yet — “still open”, “not yet” — then the assignee and the alarm details as labelled
fields, with the keys humanised (sensorId becomes “Sensor id”).
Data keys
This is an alarm widget: it takes an alarm source rather than telemetry keys, and reads the alarm fields the platform already provides. No data keys need configuring for the widget to work — the fields below are what it reads from every alarm.
| Field | Type | Used for |
|---|---|---|
severity | alarm field (string) | Severity pill, severity filter, severity mix |
type | alarm field (string) | Type column, most frequent types |
originator, originatorName | alarm field (entity id, string) | Device column, most frequent devices |
startTs, falling back to createdTime | alarm field (timestamp) | Start time, duration, timeline position |
clearTs, cleared, legacy status | alarm field (timestamp, boolean, string) | Cleared state, duration end |
ackTs, acknowledged, legacy status | alarm field (timestamp, boolean, string) | Acknowledged column, unacknowledged count |
assignee | alarm field (object) | Shown in the detail panel |
details | alarm field (object or string) | Shown in the detail panel |
State is read from cleared and acknowledged first, then from clearTs and ackTs, then from the
legacy status string, so the widget works on alarm models from before and after ThingsBoard 3.5.
Which alarms are loaded
The widget has no filter settings of its own. Which alarms arrive is set in the Filter section of the widget configuration — status, severity, type, assignee, propagated alarms — and the widget passes that filter to its alarm subscription, so filtering happens in the query rather than after the fetch.
The chips and buttons above the table are built from that same filter and can only narrow inside it. Only the severities the configuration loads get a chip, and each state group appears only when the configuration leaves that dimension free:
- Any state / Active / Cleared — hidden when the filter already loads only one of them
- Any / Acknowledged / Unacknowledged — hidden when the filter already decides that too
When the configured filter restricts something, a line under the toolbar states it. If a narrowing hides every row, the empty table says which narrowing did it and how many alarms were loaded.
The number of alarms loaded is capped by Maximum alarms to load (default 1000). Raise it for a monthly report; lower it on a dashboard that has to stay light.
Durations
- Only a cleared alarm has a duration. An open alarm has no end yet, so it is never averaged with finished ones: the average, median and longest cover cleared alarms, the card states how many that was, and open alarms are reported on their own line as the average time they have been open. If nothing cleared in the window, the card says so instead of printing a number that would be wrong.
- Durations are full durations, not clipped to the window. An alarm that started three days before a one-day window still reports its true age. Its timeline bar is clipped, because the axis is the window, but the figure is not.
CSV export
The button at the trailing edge of the toolbar exports the rows currently shown — filtered, in the current sort order, across every page, not just the visible one. Eleven columns: severity, type, device, started, acknowledged, cleared, status, duration, duration in milliseconds, assignee and details. The duration is exported twice on purpose: the readable form for a person, the millisecond form for a spreadsheet that computes with it. The file leads with a byte order mark, because Excel reads a UTF-8 CSV as Latin-1 without one and mangles every non-ASCII device name. Everything happens in the browser: no server call and no external library.
Configuration
Settings are grouped into Statistics band, Alarm table, Filters, Row actions, Export and Severity colors.
| Setting | Default | Notes |
|---|---|---|
| Show the statistics band | on | Each of the four cards also toggles individually |
| Entries per list | 3 | Length of the most frequent type and device lists |
| Show the timeline column | on | The first column to be dropped on a narrow card |
| Type / Device / Acknowledged columns | on | Turn off what your dashboard already shows |
| Sort alarms by | Newest first | Also by severity, duration, type or device |
| Rows per page | 25 | Paging is client-side over the loaded alarms |
| Maximum alarms to load | 1000 | Statistics cover exactly these alarms |
| Date format | yyyy-MM-dd HH:mm | Any Angular date pattern |
| Severity, state and acknowledgement filters, search field | on | Narrow the table; the cards keep describing the whole loaded set |
| Open the detail panel on row click | on | Off leaves the rows inert except for the widget action |
| Show the acknowledge / clear button | on | Each is separate; with every row action off the actions column disappears |
| When to show the buttons | On row hover | Or always visible — on touch they are always visible either way |
| Show the CSV export button | on | Exports the filtered rows in the current sort order |
Severity colors
Every colour is configurable. One colour drives the severity pill, the timeline bar, the severity mix, the filter chip and the detail panel marker, and the soft backgrounds are tinted from it.
| Severity | Default colour | Sample |
|---|---|---|
| Critical | #D6303C | crimson |
| Major | #E8730C | orange |
| Minor | #E3B505 | gold |
| Warning | #7A9E1F | olive |
| Indeterminate | #6B7A8F | slate |
Every neutral surface is mixed from the theme’s own text colour, so the widget follows a light or a dark dashboard without a second palette to configure.
Share Your Widget with the Community
Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.