Create an Email-Alert Trigger for DeviceHub Device Data Quality
In this guide, you will set up an alert and a trigger for a Manufacturing Connect Edge (MC 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.
Before You Begin
- You will have to enable SMTP from the Manufacturing Connect Admin Console. See Email to learn more.
- If you haven't yet connected your MC Edge instance to Manufacturing Connect, see Activate an Edge Device. An MC Edge instance needs to be activated in Manufacturing Connect before it can trigger alerts.
Step 1: Set Up an Email-Alert Trigger
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 for additional details.
From Manufacturing Connect, navigate to Events & Alerts and follow the steps below.
Step 1a: Set Up an Email Alert
To set up an email alert:
- 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.

Step 1b: Set Up a Trigger
To set up a trigger:
- 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 MC 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.
Step 2: Simulate a Disconnection
From your MCE, you will simulate the DeviceHub driver sending invalid/corrupted data.
To simulate a disconnection:
- Log in to Manufacturing Connect Edge.
- From the navigation panel, navigate to DeviceHub > Tags. The Tags pane appears.
- Click the Action menu for the tag you created and select Edit.
- For the Value Type field, select float64.
- 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.

Step 3: Verify Successful Trigger and Alert
From Manufacturing Connect, you will verify the simulated error rate.
To verify the trigger and alert:
- Log in to Manufacturing Connect. The Status Overview page displays.
- From the navigation panel, navigate to Events & Alerts > Incidents. The Incidents pane appears. Review that the incidents display in the list.
The email address that was configured for the alert will also receive the respective alert email.


