Skip to content
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Step 3. Alarms & Notifications

Alarm in ThingsBoard represents an abnormal condition or critical event related to an entity, such as a device. Alarms are generated automatically when conditions defined in alarm rules are met (for example, when a telemetry value exceeds a threshold).

In this step, you will configure an alarm rule that detects when the temperature exceeds a defined threshold. Then, you will simulate this condition by publishing telemetry data above the threshold to trigger the alarm and generate a notification.


Create an alarm rule that triggers when the temperature exceeds 25 °C.

  1. Navigate to Monitor ⇾ Alarms ⇾ Alarm rules.
  2. In the upper-right corner, click + Add alarm rule ⇾ Create new alarm rule.

In the alarm rule configuration dialog, specify the following:

  1. Alarm type: High temperature
  2. Target entity: default
  1. Click Add argument.
  2. Configure the argument:

    • Entity type: Current entity
    • Argument type: Latest telemetry
    • Time series key: temperature
    • Argument name: temperature
  3. Click Add.

This creates the temperature variable used in the alarm condition.

  1. Click Add trigger condition.
  2. Ensure that Severity is set to Critical.
  3. Add a condition in Script mode:
    // Triggers an alarm when temperature is above 25 degrees
    return temperature > 25;
  4. Click Save.

Click Add to save and activate the alarm rule.

The alarm will now be triggered whenever the device temperature exceeds 25 °C.


Publish telemetry with a value greater than 25 °C (for example, 26). Use the Check connectivity feature as described in Step 1.2 to send the test telemetry data.

Once the threshold is exceeded, the new active alarm can be viewed, acknowledged, or cleared from:

  • the Monitor ⇾ Alarms page;
  • the dashboard using the Alarms widget;
  • the Alarms tab in the device details page.

If notifications are configured for this alarm, you can view the corresponding notification by clicking the bell icon in the top-right corner of the screen or by navigating to Monitor ⇾ Notifications.

ThingsBoard notifications can inform users about alarms, device activity, and other system events through web, email, SMS, or supported third-party delivery methods.

This demonstrates how ThingsBoard detects and reacts to critical conditions in real time.