Notifications
Introduction
Notification are messages sent when an event is generated on any sensor. Events are defined as a change in state: For example from OK to CRITICAL, or from DOOR OPEN to DOOR CLOSED. The system can be configured to send this events as notifications of one or several of this types:
- SNMP Traps
- Emails
- SMS
Types of Notifications
SNMP
The azeti server is able to send any event as an SNMP trap (version 2c) to the defined receiver. The format of the message is the following:
- Trap OID = 1.3.6.1.4.1.34540.14.5.110
- 1.3.6.1.4.1.34540.14.5.110.1: output of the sensor
- 1.3.6.1.4.1.34540.14.5.110.2: sensor name
- 1.3.6.1.4.1.34540.14.5.110.3: state of the sensor (Critical, Ok, etc.)
- 1.3.6.1.4.1.34540.14.5.110.4: Timestamp of the event
- 1.3.6.1.4.1.34540.14.5.110.6: Location name
If an email server is configured then email can be used as a mean to send the notification. An example of an email notification is the following:
Dear customer, this is an eMail notification from Azeti Social Sensor Cloud. Alert recovered: Location: ASuperVirtualSite Sensor: VirtualTester (0647f4dc-f4e9-42b0-8fdc-6b7f96fb8fcd) State: WARNING Output: Virtually setted... 69.70 Time: Nov 24, 2015 20:24:36 PM Azeti SSC platform
SMS
When connected to an SMS sending platform, the system can also send the events as SMS. The same information as other notifications is sent:
Slack
Slack is a group messaging app, that can be found in https://slack.com/ The azeti server can send notifications via this app, provided it has access to the slack cloud server over the Internet.
Configuration
Channels Setup
In order to properly sent notifications, the appropriate channels have to be set up correctly. That is:
- For the email notifications, the SMTP email server
- For SMS notifications, an SMS Server
- For SNMP traps, the receiver
To configure any of those follow this steps with a user that has the ADMIN role:
- Organization → Notifications
- Fill in the information for the type of notifications that are going to be usedFor Email:
- For Email
- Host: The hostname or IP of the SMPT sending server
- User: The username of an authorized user on that serverPassword: The password of the user
- From: This is the sender address that is going o be used when sending the emails
- Subject: The subject header used on all email notifications
For SMS
Provider: The SMS server provider used. Currently only Nexmo is used, but other providers/private servers can be added on request
URL: The URL of the REST API used to send the SMSs
Key
Secret
From: This is the name or number that will be set sender of the SMS
- SNMP (Traps)
Host: The server that will receive the traps
Community: The community used to send the traps
- Slack
- URL: The webhook URL generated for you team in Slack.
- In the Slack website, to create the webhook: click on your user name → Apps & Integration → Build→ Make a custom integration → Incoming Webhooks and follow the instructions. If a webhook has already been created it can be found on Apps & Integration → Manage → Custom Integrations → Incoming Webhooks
- URL: The webhook URL generated for you team in Slack.
- For Email
Notification Setup
To enable and configure the notifications please follow this steps:
- If no timeperiod exist, create one
- Go to Organization→ Time Periods, click Add
- Write a name for the period, and for each day of the week add the time interval during which the notifications can be sent. If a day is not included then notifications will be send that day. Save
- Go to Organization→ Time Periods, click Add
- Create/Edit the user or users that will receive the notifications:
- Go to Organizations → Users
- Create a new user or Edit an existing one
- Fill the mail and phone number info that will be used for the notifications
- Go to the Notification tab, select the way that Notifications should be done (Email, SMS, SNMP or all) and the Timeperiod for each one.
- If you're using Slack, then you will need to use the username (Not: E-Mail address)
- Go to Organizations → Users
- Create a notification group:
- Go to Organization → Notifications
- Create a new notification group if needed (if no other group is going to be used)
- Click the menu button ()Assign users button on the group that is going to be used and assign all the users that are going to that group.
- Assign each sensor to the proper notification group
- Go to Configuration → Sensor Templates → Site Templates and select the template of the site or sites and click Edit
- Click Toggle SU/Normal mode to be able to edit
- Select the sensor that will trigger the notifications and click the Notifications button
- Select the notifications groups that will receive the alarms from this sensor (can be one or more)
- The Severities of the alarms that will trigger the notifications: 100 is usually the level for warning and 200 for critical
- And the Timing: Time Periods when notifications will be sent (only if it also matches the timeperiod for the notifications group), the First notification Delay (in minutes, how long the system will wait with an alarm before sending notification if it does not recover) and the Notification interval (in minutes, how often an alarm will be sent). Save
- Go to Configuration → Sensor Templates → Site Templates and select the template of the site or sites and click Edit
After this the notifications are ready, and will start to work immediately.
In order for the states notifications to work properly, the sensors should have set the severity property (severity="0" for OK, 100 for Warning, 200 for Critical)