---
title: Create an Email-Alert Based Trigger for Connector Online Status
slug: bhdm/create-an-email-alert-based-trigger-for-connector-online-status
createdAt: 2023-09-27T13:36:54.497Z
---

In this use case, you'll set up an alert and a trigger for the default MQTT SSL connector in Belden Horizon Data Operations (BHDO) that connects to Belden Horizon Data Manager (BHDM). Then you will simulate a disconnection for the connector to trigger the alert.

# Before You Begin

- You will have to enable SMTP from the Belden Horizon Data Manager Admin Console. See [Email](docId\:L2yv7i3mkj2HVMA2bLbXu) to learn more.&#x20;
- If you haven't yet connected your BHDO instance to BHDM, see [Activate an Edge Device](docId\:bbgh94p0zHJUZ0JuaO6bY). A BHDO instance needs to be activated in BHDM before it can trigger alerts.

# Step 1: Set Up an Email-Alert based Trigger&#x20;

In this step you'll create an email notification alert. Next, you will create a trigger that will use the email notification alert. See [Alerts](docId\:qcRiKcFeXyjQAbqJTKJmr) for additional details.

From Belden Horizon Data Manager, navigate to **Alerts** and follow the steps below.&#x20;

## Step 1a: 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.

   ![](https://api.archbee.com/api/optimize/vAqK-046vdh4I0e1y9cfX/gpxRjr-z6VVGItL8LK2ib_add-new-action.png)
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 1b: 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/vAqK-046vdh4I0e1y9cfX/a8QbqLLtuSCg8cZrMWJmv_add-new-trigger.png)
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

Selec&#x74;**&#x20;Edge Device&#x20;**&#x61;nd select the appropriate BHDO instance.&#x20;

### Source

- Selec&#x74;**&#x20;Metrics&#x20;**&#x61;s the source of the trigger.
- Click **Add&#x20;**&#x6E;ew rule.
- **Select Alert template**: Select *Connector 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.

When done, click **Save**.&#x20;
The alert trigger appears in the Trigger List.

![](https://api.archbee.com/api/optimize/vAqK-046vdh4I0e1y9cfX/9Wfy0Lou1OQrEMmLpg9Ld_image.png)

# Step 2: Simulate a Disconnection

From BHDO you will simulate a disconnection with BHDM.

**To simulate a disconnection:**

1. Log in to Belden Horizon Data Operations.
2. From the navigation panel, select **Integration**.
   The *Integration&#x20;*&#x70;ane appears.
3. From the *generic-mqtt-ssl* tile, click the toggle to disable the connector.

# Step 3: Verify Successful Trigger and Alert

From Belden Horizon Data Manager, you will verify the simulated disconnection.

**To verify the trigger and alert:**

1. Log in to Belden Horizon Data Manager.
2.   Select the appropriate company and project.&#x20;
   The *Dashboard&#x20;*&#x70;ane appears for the project.
3.   Scroll down to see the alert.

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

