Skip to content
Stand with Ukraine flag

Alarm report

  • Widget
  • 49 installs
  • v1.0.0
  • Aug 20, 2026
  • MIT license
  • v4.2+
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.

Widget Type
  • Alarm
Category
  • Cards & Info

Who it’s for

Anyone who needs the full picture of one entity’s alarm history, not just what’s active right now, and is asking “how has this entity been alarming, and what’s still unresolved?” — for an incident review, a shift handover, or a periodic report. Counts, durations, the severity mix, and the busiest alarm types all sit above a sortable, filterable table, so the summary and the detail are on the same screen.

What it does

Over a one-week window, a generator’s alarm history reads at a glance: 24 alarms total, 7 still active and 17 cleared, with 5 never acknowledged. The average cleared alarm lasted 2h 14m and the longest ran 3 days 6 hours, while the 7 still open have been open for 9h 39m on average — three numbers that would otherwise mean reading every row by hand.

  • Four statistics cards — counts, duration, severity mix, and the most frequent alarm types and devices, each switchable off on its own.
  • A timeline column that draws every alarm on one shared time axis, so overlapping alarms line up against each other.
  • A detail panel per alarm — its position on the report’s own time axis, the started, acknowledged and cleared timestamps spelled out, the assignee, and every alarm detail as a labeled field.
  • Acknowledge or clear an alarm right from its row, with either button switchable off for a read-only dashboard.
  • CSV export of exactly what’s on screen — filtered, in the current sort order, across every page.
  • Adapts to the card — columns give way as it narrows, and the whole card scrolls when it’s too short for the table.
  • Follows the dashboard’s light or dark theme automatically — every neutral surface is mixed from the theme’s own text color, so there’s no second palette to keep in sync, only the five severity colors below.

How to set up

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 — the table below is what it reads from every alarm.

KeyRoleTypeDescription
severityAlarm fieldSeverity pill, severity filter, severity mix
typeAlarm fieldType column, most frequent types
originator, originatorNameAlarm fieldDevice column, most frequent devices
startTs, falling back to createdTimeAlarm fieldStart time, duration, timeline position
clearTs, cleared, legacy statusAlarm fieldCleared state, duration end
ackTs, acknowledged, legacy statusAlarm fieldAcknowledged column, unacknowledged count
assigneeAlarm fieldShown in the detail panel
detailsAlarm fieldShown in the detail panel, with keys humanized (sensorId becomes “Sensor id”)

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 of its own for what gets fetched. Which alarms arrive is set in the alarm source’s own Filter configuration — status, severity, type, assignee, propagated alarms — and that filter is passed straight to the alarm subscription, so filtering happens in the query rather than after the fetch. The chips above the table are built from that same filter and can only narrow inside it: a severity or state group only gets a chip when the configuration leaves that dimension free, and a line under the toolbar states it whenever the configured filter is already restricting something.

SettingDefaultEffect
Maximum alarms to load1000Statistics are computed over exactly the alarms that were loaded. Raise it for a monthly report; lower it to keep a busy dashboard light.

How to customize

Statistics band

  • Show or hide the whole band — Show the statistics band.
  • Turn off one card at a time — Card: alarm counts / Card: duration / Card: severity mix / Card: most frequent types and devices.
  • How many entries in the “most frequent” lists — Entries per list.

Alarm table

  • Show or hide the timeline column — the first column to be dropped automatically on a narrow card.
  • Show or hide the type, device and acknowledged columns — turn off whatever your dashboard already shows elsewhere.
  • The starting sort order — Sort alarms by: newest or oldest first, most severe first, longest first, or type or device alphabetically.
  • Rows per page, paged client-side over the alarms already loaded.
  • The date format used throughout the table and detail panel.

Filters

  • Show or hide the severity and status chips, and the search field — these only narrow inside whatever the alarm source’s own Filter configuration already loaded.

Row actions

  • Open the detail panel on row click, or leave rows inert except for a widget action.
  • Show the acknowledge and clear buttons, each switchable on its own — turn both off for a read-only dashboard.
  • When the buttons appear — on row hover, or always visible (on touch they’re always visible either way).

Export

  • Show or hide the CSV export button.

Severity colors

  • Each severity’s own color — Critical, Major, Minor, Warning, Indeterminate. One color drives the pill, the timeline bar, the severity mix, the filter chip and the detail-panel marker together, and the soft backgrounds are tinted from it automatically.

Durations and CSV export

An alarm’s duration only counts once it’s cleared. An open alarm has no end yet, so it’s never averaged in with finished ones: the average, median and longest cover cleared alarms only, the card states how many that was, and open alarms get their own line as the average time they’ve been open so far. If nothing cleared in the window, the card says so instead of printing a number that would be misleading.

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 itself is not.

CSV export downloads 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 appears twice on purpose: a readable form for a person, milliseconds for a spreadsheet to compute with. The file leads with a byte-order mark, since 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, no external library.

Tips

  • Narrow the alarm source’s own Filter configuration first if you want the report to open already scoped to what matters — the in-widget chips can only narrow further inside it, never load alarms the filter itself excluded.
  • The detail panel’s own timeline includes a small notch marking when the alarm was acknowledged, which the narrow lane in the row itself can’t fit — open a row when you need that level of detail.
  • Set Maximum alarms to load high enough to cover the busiest window this report will actually be viewed over; the four statistics cards describe exactly that loaded set, not the true total if the cap was reached.

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.