mO SharemO Share

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
On this page:

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

Email


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:

  1. Organization →  Notifications

  2. Fill in the information for the type of notifications that are going to be usedFor Email:
    1. For Email
      1. Host: The hostname or IP of the SMTP sending server
      2. User: The username of an authorized user on that server
      3. Password: The password of the user
      4. From: This is the sender address that is going to be used when sending the emails
      5. Subject: The subject header used on all email notifications
    2. For SMS

      1. Provider: The SMS server provider used. Currently only Nexmo is used, but other providers/private servers can be added on request

      2. URL: The URL of the REST API used to send the SMSs

      3. Key

      4. Secret

      5. From: This is the name or number that will be set sender of the SMS

    3. SNMP (Traps)
      1. Host: The server that will receive the traps

      2. Community: The community used to send the traps

    4. Slack
      1. URL: The webhook URL generated for your team in Slack.  
      2. In the Slack website, to create the webhook: click on your user name →  Apps & Integration → BuildMake a custom integrationIncoming 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:

  1. If no timeperiod exist, create one
    1. Go to OrganizationTime Periods, click Create New
    2. 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
  2. Create/Edit the user or users that will receive the notifications:
    1. Go to Organizations Users

    2. Create a new user or Edit an existing one
    3. Fill the mail and phone number info that will be used for the notifications
    4. 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
      1. 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).
  3. Create a notification group:
    1. Go to OrganizationNotifications
    2. Create a new notification group if needed (if no other group is going to be used)
    3. 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. 
  4. Assign each sensor to the proper notification group
    1. Go to ManagementTemplates → Site Templates and select the template of the site or sites and click Edit

    2. Click Toggle SU/Normal mode to be able to edit
    3. Select the sensor that will trigger the notifications and click the Notifications button
    4. Select the notifications groups that will receive the alarms from this sensor (can be one or more)
    5. The Severities of the alarms that will trigger the notifications: 100 is usually the level for warning and 200 for critical
    6.  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


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)