---
title: Create an Email-Alert Trigger for DeviceHub Device Status
slug: edgemanager/how-to-guides/lem-user-ui-guides/alerts-guides/create-an-email-alert-trigger-for-devicehub-device-status
description: Review this how-to guide on creating an alert for DeviceHub device status. 
docTags: 
createdAt: 2024-01-04T16:23:42.164Z
---

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.

# Before You Begin

- You will have to enable SMTP from the Litmus Edge Manager Admin Console. See [Email](docId\:GcxRXKR3-oc_O9zqz7Jke) to learn more. 
- 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.

# Step 1: Add Device

Follow the steps to [Connect a Device](docId:3eyAfPpweuVmBLCEy17sq). Select the Device Type **Simulator&#x20;**&#x61;nd Driver Name **Generator**.

# Step 2: Set Up an Email-Alert based Trigger

In this step, you will create an email notification alert and then set up a trigger to use it. Please refer to the [Alerts](docId\:BWq6oBkuTNZgIJBIgQPBE) for further information.

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

## Step 2a: Set Up an Email Alert

**To set up an email alert:&#x20;**

1. From the *Alerts&#x20;*&#x70;ane, click the **Add new Action** icon. &#x20;
   The *Add new Action* dialog box appears.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/jcIeQ5n7Ahq0K5lkrL8Pq_add-new-action-icon.png" size="80" width="1378" height="719" caption="Add new Action icon" position="center" showCaption="true"}
2. From the *Add new Action* dialog box, enter the following details:
   - **Action Template**: Select EMAIL.
   - **Action Name**: Enter an action name.&#x20;
   - **Enter email**: Enter an email address that will receive the alert.
   - **Notifications Limit**: Enter 1.&#x20;
   - **Interval**: Select *minute*.
3. Click **Add**.&#x20;
   The newly created action appears in the *Action List*.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/12fxB2Jd2r2gu7ixNdevB_image.png" size="80" width="1554" height="496" caption="Creating a new email alert" position="center" showCaption="true"}

## Step 2b: Set Up a Trigger

**To set up a trigger:&#x20;**

1. From the *Alerts&#x20;*&#x70;ane, click the **Add new Trigger** icon.&#x20;
   The *New Trigger* pane appears.
   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/iR8l5AaljyD_E_uqcuXTG_aw.png "Add new Trigger icon")
2. From the *New Trigger* pane, configure the following sections:&#x20;

### Trigger

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

### Scope

- Choose the **Edge Device** option and select the applicable Litmus Edge instance.

### Source

- Selec&#x74;**&#x20;Metrics&#x20;**&#x61;s the source of the trigger.
- Click **Add&#x20;**&#x6E;ew rule.
- **Select Alert template**: Select *DH device online status.*
  - Enter the value `60` for *Alert Delay, seconds*.&#x20;

### Action

- **Action List**: Select the action you previously created.
- **Continuously**: Select the checkbox to send notifications continuously. &#x20;
- **Notification Period, minutes**: Enter 1.

&#x20;    3\. Click **Save**.&#x20;
&#x20;    The alert trigger appears in the *Trigger&#x20;*&#x4C;ist.

![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/upvfX3S2xUd7W4-gKdjqv_image.png "Creating a device status email trigger")

# Step 3: Simulate a Disconnection

From Litmus Edge, you will simulate a disconnection with Litmus Edge Manager.

**To simulate a disconnection:**

1. Log in to Litmus Edge.
2. From the Navigational panel, select **DeviceHub.**
   The *Devices&#x20;*&#x70;ane appear&#x73;**.**
3. To disconnect, click the **Stop Device** button located on the *device&#x20;*&#x74;ile that is currently connected.
   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/N14Ct1UcAf_cHDxig9BKF_ax.png "Disabling the Connected Device Status")

# Step 4: Verify Successful Trigger and Alert

From Litmus Edge Manager, you will verify the simulated disconnection.

**To verify the trigger and alert:**

1. Log in to Litmus Edge Manager.
2. Select the appropriate company and project.
   The *Dashboard&#x20;*&#x70;ane appears for the project.
3. From the navigation panel, select **Incidents**.
   The *Incidents&#x20;*&#x70;ane appears.

Confirm you see the incident listed.&#x20;

The email address that was configured for the alert will also receive the respective alert email.

![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/xgsr3FAuSuzvpV1pDZx2R_image.png "Alert Email")

