Alerts

Introduction

One of the features of SensorSDK is the ability to be programmed so it can send emails and display information on the main site when certain things goes wrong like for example temperature in your fridge going over -15°C or a sensor node that's not reporting for a long time. This Alert framework inside SensorSDK can be easily configured by the user.

Vocabulary

  • Alert Definition: a set of rules used to determine if a certain alert should be risen or not.
  • Alert Definition Template: a set of templates used for creating email content when reporting a new alert.
  • Alert: a certain alert that was triggered at a certain moment based on a certain Alert Definition.
  • Alert timeout: on certain events you want to make sure you get more than one email when something goes wrong, this is what the timeout on a Alert Definition is used for. If after timeout seconds since the alert was originally created the monitored variable is still at the alert condition then it will triggered again.

Types of Alerts

There are basically four kinds of alerts available as of February 2010

over_range.svg Over range

In this kind the alert is set when the managed variable gets over set point, and will not be cleared back until it goes under clear point

Use Cases:

  • Over temperature on a fridge.
  • Over current on a power line.
  • Over speed on a vehicle speed tracking system.
under_range.svg Under Range

In this kind the alert is set when the managed variable gets under set point, and will not be cleared back until it goes over clear point

Use Cases:

  • Freezing point on a water pipe.
  • Low voltage on a power line.
  • Low temperature on a cooking process.
in_range.svg In range

In this kind the alert is set when ever the managed variable is in between clear point and set point

Use Cases:

  • Chemical process control.
No data

In this kind the alert is triggered when no data is reported for over set point seconds, and will get automatically cleared when it reaches timeout

Use Cases:

  • When ever you need to monitor a variable that's critical for your system
  • Detect when ever something is malfunctioning on the AIRcable SMD or the Communication Protocol

Alert Definition Creation

Through the SensorSDK Admin Site you can reach the Alert Definition creation and editing page.

alarm1.jpg
alarm2.jpg

++Steps needed for creating an Alert Definition:

  1. Select the type of alert you're defining from the drop-down box.
  2. Choose field to monitor, field names are going to be generated based on the available plug-ins your system have.
  3. Define set point based on the kind of alert you're using.
  4. Define clear point based on the kind of alert you're using.
  5. Define the observed nodes from the list.
  6. Choose users that will get notified when this alert gets raise.
  7. Finally you can mark your alarm as either enabled or disabled. And setup a timeout value.

Clearing Alerts

Alerts can be cleared under three different circumstances:

  • A user mark the alert as fixed.
  • The monitored variable gets back into normal values.
  • The alert reaches the timeout value.

Only the first case is not handled automatically, all the other cases are going to be handled by the SensorSDK Alerts framework

When an alert is triggered the selected users will get a notification like for example

[SensorSDK Notifications] [SensorSDK - Alerts] Stairs[00:50:C2:7F:42:78]: is not reporting

This is an automatically generated message, don't try replying to it.
Stairs[00:50:C2:7F:42:78] hasn't reported for the last 600.0 seconds.
Please check what's wrong. This alert will be sent again in 100 seconds if not cleared first.
Regards,
SensorSDK Automatic alerts

And the initial screen well get updated too when you are logged-in:

alarm3.jpg The initial screen gets updated when you're logged-in, you can also click on a alert and get into the Alert administration page
alarm4.jpg From this screen you can get some detailed information regarding an Alert and mark it as taken action if you think the reason why the alarm was triggered is no longer important

Alert Definition Templates

When ever an email is generated for an Alert the corresponding text of the email is creating according to a user defined template.

From scratch template generation might be a bit complex, so we provided the quick setup system with a way to automatically fill the templates with some basic information, if you need to add more information to your Alert emails then you will have to get some understanding on django template system, you can read more about this at http://docs.djangoproject.com/en/1.1/topics/templates/

[[note]] Alert definition template edition is a bit complex for just one page, so we are not adding it here yet, if you need more information about this please contact us.[[/note]]

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License