Skip to content

Alerts and Notifications

Introduction

Alerts and Notifcations send notifications when other systems or someone needs to know what is happening in Edge Xpert. Examples of alerts and notifications broadcast by other services include:

  • the provisioning of a new devices
  • sensor data outside of certain parameters (usually detected by a Device Service or Rules Engine)
  • system or service malfunctions (usually detected by System Management.)

Notifications are informative, whereas Alerts are typically of a more important, critical or urgent nature possibly requiring immediate attention.

The process is as follows:

  1. REST APIs, provided for the other microservices, on-box and off-box applications are passed to the Alerts and Notifications
  2. The data which is passed by Alerts and Notifications flows to the Notifications Handler
  3. The Notifications Handler passes the notifications to the Distribution coordinator based on the severity of the notification, as follows:
    • CRITICAL severity notifications are sent immediately. When an error is encountered in sending a critical notification, a separate retransmission task is scheduled and the transmission record persists. After a configurable limit (retransmission limit) is exceeded, the service escalates the notification and creates a new one to notify the receiver of the failure.
    • NORMAL severity notifications are sent immediately to the receivers and the status is updated to PROCESSED
  4. When the Distribution coordinator receives the notifications, it queries the subscriptions to acquire the receivers and receivers channels (the subscribers)
  5. The Distribution coordinator passes the notifications to the relevant channel senders to send the notification to the subscribers
  6. The subscriber receives the notification through their preferred channels, either by REST callback or email, as defined in their subscription

The process is illustrated below:

Note

MQTT and ZeroMQ channels are supported in Edge Xpert 1.7 and later versions.

Supporting Services Alerts Architecture

Alerts and Notifications Data Model

The following diagram shows the alerts and notifications data model.

Alerts and Notifications Data Model

Data Retention

Note

This feature is new in Edge Xpert v2.3.6.

As with core data, the number of notification can increase indefinitely, so the same retention mechanism can be also used to keep the latest notification and clean up the old ones.

For more information, see Data Retention and Persistent Caps for more details.

Data Directory

Property Description
The object used to describe the receiver and the recipient channels
ID Uniquely identifies a subscription, for example a UUID
Name Uniquely identifies a subscription
Receiver The name of the party interested in the notification
Description Human readable description explaining the subscription intent
Categories Link the subscription to one or more categories of notification.
Labels An array of associated means to label or tag for categorization or identification
Channels An array of channel objects indicating the destination for the notification
ResendLimit The retry limit for attempts to send notifications
ResendInterval The interval in Golang duration string format of resending the notification. A Golang duration string is a sequence of decimal numbers, each with a unit suffix, such as "300ms" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d", "w", "y".
AdminState An enumeration string indicating the subscription is locked or unlocked
Property Description
The object used to describe the notification end point. Channel supports transmissions and notifications with fields for delivery via email or REST
Type Object of ChannelType - indicates whether the channel facilitates email or REST
MailAddress EmailAddress object for an array of string email addresses
RESTAddress RESTAddress object for a REST API destination endpoint
Property Description
The object used to describe the message and sender content of a notification.
ID Uniquely identifies a notification, for example a UUID
Sender A string indicating the notification message sender
Category A string categorizing the notification
Severity An enumeration string indicating the severity of the notification - as either normal or critical
Content The message sent to the receivers
Description Human readable description explaining the reason for the notification or alert
Status An enumeration string indicating the status of the notification as new, processed or escalated
Labels Array of associated means to label or tag a notification for better search and filtering
ContentType String indicating the type of content in the notification message
Property Description
The object used to group Notifications
ID Uniquely identifies a transmission, for example a UUID
Created A timestamp indicating when the notification was created
NotificationId The notification id to be sent
SubscriptionName The name of the subscription interested in the notification
Channel A channel object indicating the destination for the notification
Status An enumeration string indicating whether the transmission failed, was sent, was resending, was acknowledged, or was escalated
ResendCount Number indicating the number of resent attempts
Records An array of TransmissionRecords
Property Description
Information the status and response of a notification sent to a receiver
Status An enumeration string indicating whether the transmission failed, was sent, was acknowledged, or escalated
Response The response string from the receiver
Sent A timestamp indicating when the notification was sent