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.2.1.1.3.0 TimeTicks Sysuptime - The difference in ms between the time when the notification was generated at the remote site and when it was sent via trap to the receiver
1.3.6.1.4.1.34540.14.5.110.1 OCTECTSTRING output of the sensor
1.3.6.1.4.1.34540.14.5.110.2 OCTECTSTRING sensor name
1.3.6.1.4.1.34540.14.5.110.3 OCTECTSTRING state of the sensor (Critical, Ok, etc.)
1.3.6.1.4.1.34540.14.5.110.4 COUNTER64 Timestamp of the event as epoch
1.3.6.1.4.1.34540.14.5.110.4 OCTECTSTRING Timestamp of the event as a string ("26.07.2017 10:25:27.703 GMT+00:00")
1.3.6.1.4.1.34540.14.5.110.6 OCTECTSTRING Location name
1.3.6.1.4.1.34540.14.5.110.7 OCTECTSTRING Location guid
1.3.6.1.4.1.34540.14.5.110.8 OCTECTSTRING Sensor guid
1.3.6.1.4.1.34540.14.5.110.10 INTEGER Severity
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 platformSMS
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 SMTP sending server
User: The username of an authorized user on that server
Password: The password of the user
From: This is the sender address that is going to 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 your 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
Notification Setup
To enable and configure the notifications please follow this steps:
If no timeperiod exist, create one
Go to Organization→ Time Periods, click Create New
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 not be sent that day. Save
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. Save
For slack, the slack username is necessary as well. Instead of the username, a channel name can also be used adding the hash sign (#example_channel).
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 Management→ 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