How-To Guides
...
Litmus Edge Manager User UI Gu...
Alerts Guides

Create an Email-Alert Trigger for DeviceHub Device Data Quality

15min

In this guide, you will set up an alert and a trigger for a Litmus Edge device that is generating invalid/corrupted data. Then you will simulate an error output so that an alert is triggered. When the alert is triggered, the email addresses specified in the trigger will receive an email with information about the alert.

Video



Before You Begin

  • You will have to enable SMTP from the Litmus Edge Manager Admin Console. See Email to learn more.
  • If you haven't yet connected your Litmus Edge instance to Litmus Edge Manager, see Activate an Edge Device.

Step 1: Add Device

Follow the steps to Connect a Device. Select the Device Type Simulator and Driver Name Generator.

Step 2: Add Tag

After connecting the device, you can Add a Tag to the device.

Configure the following for the tag:

  • Name: S - Random value generator
  • Value Type: string

Step 3: Import Topic into Default Generic MQTT SSL Connector

You will next import the tag you've created as a topic into the generic MQTT SSL connector that connects Litmus Edge to Litmus Edge Manager.



Step 4: Set Up an Email-Alert Trigger

In this step you will create an email notification alert. Next, you will create a trigger that will use the email notification alert. See Alerts for additional details.

From Litmus Edge Manager, navigate to Alerts and follow the steps below.

Step 4a: Set Up an Email Alert

To set up an email alert:

  1. From the Alerts pane, click the Add new Action icon. The Add new Action dialog box appears.

    Add new Action icon
    Add new Action icon
    
  2. From the Add new Action dialog box, enter the following details:
    • Action Template: Select EMAIL.
    • Action Name: Enter an action name.
    • Enter email: Enter an email address that will receive the alert.
    • Notifications Limit: Enter 1.
    • Interval: Select minute.
  3. Click Add. The newly created action appears in the Action List.
Creating a new email alert
Creating a new email alert


Step 4b: Set Up a Trigger

To set up a trigger:

  1. From the Alerts pane, click the Add new Trigger icon. The New Trigger pane appears.

    Add new Trigger icon
    Add new Trigger icon
    
  2. From the New Trigger pane, configure the following sections.

Trigger

  • Name: Enter a name for the trigger.
  • Active: Select the checkbox.
  • Dashboard: Select the checkbox.
  • Description: Enter a description for the trigger.

Scope

Select Edge Device and select the appropriate Litmus Edge instance.

Source

  • Select Metrics as the source of the trigger.
  • Click Add new rule.
  • Select Alert template: Select DH device data quality.
    • For Target Value, msgs/minute, enter 1 minute.
    • For Alert Delay, seconds, enter 60 seconds.

Action

  • Action List: Select the action you previously created.
  • Continuously: Select the checkbox to send notifications continuously.
  • Notification Period, minutes: Enter 1.

When done, click Save. The alert trigger appears in the Trigger List.

Creating a new trigger
Creating a new trigger


Step 5: Simulate Invalid/Corrupted Data

From Litmus Edge, you will simulate the DeviceHub driver sending invalid/corrupted data.

To simulate a disconnection:

  1. Log in to Litmus Edge.
  2. From the navigation panel, navigate to DeviceHub > Tags. The Tags pane appears.
  3. Click the Action menu for the tag you created and select Edit.

    The Edit option for the tag
    The Edit option for the tag
    
  4. For the Value Type field, select float64.
  5. For the Formula field, corrupt the Formula field by replacing the s in sin with 1 so that the final formula starts with 1in. Then, click Update Tag.
Corrupted Tag Formula
Corrupted Tag Formula


Step 6: Verify Successful Trigger and Alert

From Litmus Edge Manager, you will verify the simulated error rate.

To verify the successful trigger and alert:

  1. Log in to Litmus Edge Manager.
  2. Select the appropriate company and project. The Dashboard pane appears for the project.
  3. From the navigation panel, select Incidents. The Incidents pane appears.
List of incidents
List of incidents


The email address that was entered from Step 4a: Set up an Email Alert will also receive the respective alert email.

Sample email that LEM will send out
Sample email that LEM will send out