Create an Email-Alert Trigger for DeviceHub Device Status
In this guide, you will configure an alert and a trigger to detect any unexpected disconnections of DeviceHub devices that connect to Litmus Edge Manager. Afterward, you will simulate a disconnection for one of the devices to trigger the alert.
- To connect your Litmus Edge instance to Litmus Edge Manager, see Activate an Edge Device. A Litmus Edge instance needs to be activated in Litmus Edge Manager before it can trigger alerts.
Follow the steps to Connect a Device. Select the Device Type Simulator and Driver Name Generator.
In this step, you will create an email notification alert and then set up a trigger to use it. Please refer to the Alerts for further information.
From Litmus Edge Manager, navigate to Alerts and follow the steps below.
To set up an email alert:
From the Alerts pane, click the Add new Action icon. The Add new Action dialog box appears.
- 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.
- Click Add. The newly created action appears in the Action List.
To set up a trigger:
From the Alerts pane, click the Add new Trigger icon. The New Trigger pane appears.
- From the New Trigger pane, configure the following sections:
- Name: Enter a name for the trigger.
- Active: Select the checkbox.
- Dashboard: Select the checkbox.
- Description: Enter a description for the trigger.
- Choose the Edge Device option and select the applicable Litmus Edge instance.
- Select Metrics as the source of the trigger.
- Click Add new rule.
- Select Alert template: Select DH device online status.
- Enter the value 60 for Alert Delay, seconds.
- Action List: Select the action you previously created.
- Continuously: Select the checkbox to send notifications continuously.
- Notification Period, minutes: Enter 1.
3. Click Save. The alert trigger appears in the Trigger List.
From Litmus Edge, you will simulate a disconnection with Litmus Edge Manager.
To simulate a disconnection:
- Log in to Litmus Edge.
- From the Navigational panel, select DeviceHub. The Devices pane appears.
To disconnect, click the Stop Device button located on the device tile that is currently connected.
From Litmus Edge Manager, you will verify the simulated disconnection.
To verify the trigger and alert:
- Log in to Litmus Edge Manager.
- Select the appropriate company and project. The Dashboard pane appears for the project.
- From the navigation panel, select Incidents. The Incidents pane appears.
Confirm you see the incident listed.
The email address that was configured for the alert will also receive the respective alert email.