Stand with Ukraine flag
Try it now Pricing
Edge
Community Edition Professional Edition Cloud Edge PE Edge IoT Gateway License Server Trendz Analytics Mobile Application PE Mobile Application MQTT Broker
Documentation > Key concepts > Alarms
Getting Started
Installation Architecture API FAQ
On this page

Edge Alarms

Overview

The ThingsBoard Alarm is an essential feature for monitoring and responding to entities events and conditions. For a comprehensive understanding of the ThingsBoard Alarm feature, please refer to the Working with Alarms documentation.

Although the Alarm feature for the Edge is designed in a similar manner to that of the Cloud, it includes several notable additions:

  • Alarms are processed locally on the Edge and focused on the immediate conditions for alarm triggering without relying on connectivity.
  • The Alarm data can be pushed from the Edge to the Cloud and can also be sent back from the Cloud to the Edge. This setup enables real-time monitoring and management of alarms across different locations.
  • Edge Alarms can be integrated with other local systems or software solutions for further processing, notifications, or actions.

In essence, the ThingsBoard Edge Alarms provide real-time, localized alarm management that can operate independently of Cloud connectivity.

Create an Alarm on the Edge Instance

The Edge Alarms are created and configured in the same way as the Cloud Alarms. Therefore, it is necessary to define the parameters and the rules according to which the alarm is to be triggered.

The easiest way to create an Alarm is to use the Alarm Rules within the Device profile. The majority of tasks can be configured with Alarm Rules with minimal effort.

If more complex logic is required, we suggest utilising the alternative option, namely the “Create Alarm” and “Clear Alarm” rule nodes in the Rule Engine. This is a more advanced option that requires a certain level of programming expertise. Please refer to the corresponding example.

Alarms Pushing from the Cloud to the Edge

The ThingsBoard system allows for pushing Alarms from the Cloud to the Edge in order to enhance operational efficiency and reduce reliance on Cloud resources.

Prerequisite

It is essential to determine which Rule chain you intend to use, as this will have a significant impact on the configuration process.

Guidelines

To push Alarms from the Cloud to the Edge, follow these steps:

  • Log in to the ThingsBoard Cloud and go to the Profiles > Device profiles section to create or modify the Device profile. Select the appropriate Default rule chain. Then, configure the Alarm Rule.
  • Go to the Entities > Devices section. You can create a new Device or edit the existing one. On the "Device details" page, assign newly created (or updated) Device profile to this Device. Click the “Apply changes” button.
  • Go the Edge management > Instances section, select the “Manage devices” option and assign this device to the Edge instance.
  • Go to the Rule Chains section, to modify the Rule Chain you have assigned to the Device profile.
  • On the Rule Chain edit page, in the Node search bar find the "push to edge" node. It pushes messages from Cloud to Edge. Once message arrives to this node it will be converted into Edge event and saved to the local database. Drag and drop the node onto the Rule Chain sheet. Then, in the "Add rule node" pop-up window enter the node title and select the "Server attributes" option in the "Entity attributes scope" field. Click the "Add" button to proceed.
  • Connect the “device profile” node to the "push to edge" node and set the “Alarm Created”, “Alarm Updated”, “Alarm Severity Updated”, and “Alarm Cleared” link labels. Click the “Apply changes” button in the Rule Chain sheet.
  • To test if the rule and node are working, navigate to the Entities > Devices section, find your Device and open the "Device details" page. Click the "Check connectivity" button. Trigger the Alarm Rule by executing the corresponding command in the terminal.
  • To verify the received Alarm notification, go to the Entities > Devices section, open the "Device details" page and select the “Alarm” tab. You also can view the incoming Alarm notification in the Notification center.
  • To verify that the notification is propagated to the Edge, log in to the Edge instance and go to the Entities > Devices section, open the "Device details" page and select the “Alarm” tab.
  • Make sure to Acknowledge and Clear the notification after you received it. You can do it on either the Cloud or the Edge. If the Uncleared Alarm exists, it will be updated, instead of being created.

Alarms Pushing from the Edge to the Cloud

The ThingsBoard system also allows for pushing Alarms from the Edge to the Cloud.

Doc info icon

Please note!
You cannot create or edit the Rule Chain on the Edge itself. It must be configured as a template on the Cloud (Server), and then assigned to the Edge instance. Only then will the actual Rule Chain, derived from that template, begin to function and process data from devices (entities) according to its configuration.

Prerequisite

It is essential to determine which Rule chain you intend to use, as this will have a significant impact on the configuration process.

Guidelines

To push Alarms from the Edge to the Cloud, follow these steps:

  • Log in to the ThingsBoard Edge and go to the Profiles > Device profiles section to create or edit the Device profile. Select the appropriate Default rule chain. Set the Alarm Rule.
  • Go to the Entities > Devices section. You can create a new Device or edit the existing one. On the "Device details" page, assign newly created (or updated) Device profile to this Device. Click the “Apply changes” button.
  • Log in to the ThingsBoard Cloud and go to the Edge management > Rule chain templates section to modify the Rule Chain you have assigned to the Device profile.
  • On the Rule Chain edit page, in the Node search bar find the "push to cloud" node. It pushes messages from Edge to Cloud. Once message arrives to this node it will be converted into Cloud event and saved to the local database. Drag and drop the node onto the Rule Chain sheet. Then, in the "Add rule node" pop-up window enter the node title and select the "Server attributes" option in the "Entity attributes scope" field. Click the "Add" button to proceed.
  • Connect the “device profile” node to the "push to edge" node and set the “Alarm Created”, “Alarm Updated”, “Alarm Severity Updated”, and “Alarm Cleared” link labels. Click the “Apply changes” button in the Rule Chain sheet.
  • To test if the rule and node are working, log in to your Edge instance and navigate to the Entities > Devices section. Find your Device and open the "Device details" page. Click the "Check connectivity" button. Trigger the Alarm Rule by executing the corresponding command in the terminal.
  • To verify the received Alarm notification, go to the Entities > Devices section, open the "Device details" page and select the “Alarm” tab. You also can view the incoming Alarm notification in the Notification center.
  • To verify that the notification is propagated to the Cloud, log in to the ThingsBoard Cloud (Server) and go to the Entities > Devices section, open the "device details" page and select the “Alarm” tab.
  • Make sure to Acknowledge and Clear the notification after you received it. You can do it on either the Cloud or the Edge. If the Uncleared Alarm exists, it will be updated, instead of being created.

Next steps