Alert Rules
Introduction
Alert rules is a function that allows the creation of rules to send notification to a person. Users can set these rules to send an email, sms or whatsapp message when certain conditions are met. For instance, if the water in a pipe flows faster than a certain amount per minute, a notification will be sent out.
When an alert rules is created with sensor types, the conditions of the alert rule will be applied to all the sensors within the particular sensor type.
However, if the alert rules is created with sensors, the alert rule is applied only to the particular sensor.
We can access settings tab from the sidebar to create an alert rule.
The alert rules tab contain a list of rules along with their name (Rule name), the date it was created (Created at), severity, alert actions, status, and action buttons.
Creating an Alert rule
To create an alert rule, we will click on the Add Rules button.
Clicking on Add Rules button will open a modal. The add alert rule modal contains 3 sub sections: Details, Conditions, and Actions.
In the first section named Details, we have to enter the name of the alert rule, rule severity (Low, medium, or high), and the message.
In the next section named Conditions, there are 2 tabs: policy and grouping.
In the policy tab, we can select the sensor or sensor type and the parameters of the particular sensor or sensor type. In the parameter selection, we have 3 options, e.g.
- Send an alert when data is outside the bound range. (In this section, we define the parameter’s upper and lower bounds.)
- Send an alert if the data exceeds the upper limit. (In this we define the upper value for the parameter).
- Send an alert if the data falls below the lower threshold. (In this, we define the lower value for the parameter).
The alert rule will only be activated when conditions set in the parameter selection have been met.
After adding the policy, click on the Next button.
In the grouping tab, we can define the time interval of a notification that will be sent when the conditions are met. For instance, if the room temperature exceeds 40 degrees Celcius, a notification will be sent every minute.
Click on Done at the top right corner, then click on Next button at the bottom right corner after setting the values in the grouping tab.
In the last section named Actions, there are 2 tabs: Media and Recipients.
In the Media tab, we can select how we want the alerts to be sent. E.g. SMS, email, or whatsapp.
After selecting the media, click on Next button, which is at the top right corner.
In the Recipients tab, we can add phone numbers or emails for alert rules to be sent to.
Click on Done button at the top right corner and then click on Save button to add the alert rule after the recipients have been added.
Editing a Alert rule
Clicking on edit alert rule button will open up a modal. The modal contains 3 sub sections: details, conditions, and actions.
In the first section named Details, we can modify the name of the alert rule, rule severity (Low, medium, or high), and the message.
If we require to change the policy or grouping interval of the alert rule, we have to access the second section, condition, where we can modify the parameter's condition and the time interval for the alerts.
If we require to modify the media or recipients, we have to access the third section, actions, where we can add, edit or remove media and recipients.
After entering the details and clicking on the save button, the modification on the alert rule will be saved.
Deleting a Alert rule
Clicking on the delete alert rule button will open up a confirmation modal.
If we click on yes, the specific alert rule will be deleted.