---
title: Set Up Alert Triggers
slug: set-up-alert-triggers
docTags: 
createdAt: 2022-10-05T21:11:22.000Z
---

:::hint{type="info"}
**Note**: The user interface below is for Manufacturing Connect version 2.26.0 and later.&#x20;
:::

You can add a user alert trigger for edge devices in th&#x65;*&#x20;Triggers* section in th&#x65;*&#x20;Alerts* module.&#x20;

:::hint{type="warning"}
**Important**: Triggers require an action for notification implementation.
:::

Variables change depending on the **Source** selected.

# Before You Begin

Add an action to the *Action List* to receive a notification. See [Add new Action](docId:2zMaXAfW8FaxD-bhWSeP6) for detail&#x73;*.*

# Step 1: Select and Set Up Source

Completing the *Source&#xA0;*&#x73;ection first avoids issues with the variables for th&#x65;***&#xA0;**&#x53;ubject***&#xA0;**&#x61;nd *Message***&#xA0;**&#x66;ields in th&#x65;*&#xA0;Trigger***&#xA0;**&#x73;ection. The source is the type of condition needed to trigger an alert.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/R4OT9k-ljt8QqEDDIhogE_image.png" size="70" width="820" height="116" position="center" caption="Source section" showCaption="true"}

:::hint{type="info"}
**Note**: When a Google Cloud Platform (GCP) Marketplace-deployed Manufacturing Connect is upgraded (See [Install or Upgrade Manufacturing Connect](docId\:yHwg58LEB5Hm4g507YeG0)) from an earlier version to version 2.10.0, Metrics-based alerts will not function. These GCP Marketplace-deployed Manufacturing Connect instances must be backed up, reinstalled and restored (See [Export/Import](docId\:zOT8iP7RKOxfup5ahTQo-) and [Install or Upgrade Manufacturing Connect](docId\:yHwg58LEB5Hm4g507YeG0)) for Metrics-based alerts to function.
:::

**To select a source**:

1. Select a **Source**.   &#x20;The options are:&#x20;
   - **Metrics:&#x20;**&#x54;he *Trigger* section's *Subject* and *Message* fields will be hidden and disabled.
   - **Events:&#x20;**&#x54;he *Trigger* section'&#x73;*&#x20;Subject* and *Message* fields will be revealed and enabled.
2. Click the **Add** link to add a new rule. The rule table drops down. The rule table is dependent on your source selection.

## Step 1a: Set Up Metrics Source

Select a metrics source to set up an alert that triggers based on metrics collected by Manufacturing Connect, specifically when the value of a variable is a certain desired value or certain set/interval of values.  You may create only one metrics rule per alert.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/P6pEUNYSLRmLtA_wP_2ZT_image.png" size="80" width="1911" height="505" position="center" caption="Metrics Source" showCaption="true"}

**To set up a metrics source**:

1. From the **Select Alert template** drop-down list, select an alert template. The options are:
   - Connector disk buffer | Integration
   - Connector online status | Integration
   - DH device online status | Device Hub
   - DH device data quality | Device Hub
   - Edge Device online status | Edge Device
   - Edge Device license expiration | Edge Device
   - Edge Device free disk space | Edge Device
   - Edge Device memory available | Edge Device
   - Edge Device CPU idle | Edge Device
2. For the alert template you've chosen, for each of it's respective fields, enter a respective value.

## Step 1b: Set Up Events Source

Select an events source to set up an alert that triggers when a specific event occurs.&#x20;

:::hint{type="info"}
**Note:&#x20;**&#x54;he trigger for *Events* in Edge devices will only work if the *Forward Events&#x20;*&#x74;oggle is enabled. For more details on events, refer to the [Events](docId:9b5tzo8OFqTJ9yqtHBOMZ) documentation.&#x20;
:::

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/X1YV4Me07n1q2Gd8I6daR_image.png" size="80" width="1898" height="537" position="center" caption="Events Source" showCaption="true"}

**To set up an events source**:

1. From the **Severity** drop-down list, select an option.&#x20;
   - *All*
   - *Info*
   - *Warning*
   - *Alert*
2. From the **Component** drop-down list, select an option.&#x20;
   - *All*
   - *cc - Integrations*
   - *mp - Marketplace*
   - *dh - Device Hub*
   - *auth - Auth*
   - *dm - Device Management*
3. From the **Event ID&#x20;**&#x64;rop-down list, select an option. Options are dependent on th&#x65;*&#x20;Component&#x20;*&#x73;elected. See [Event ID for User Alert Triggers](docId:7iXSk58NhRPYc8hj_Ax73).
4. (Optional) Click **Show Event Attributes...**, for each of the event attributes, enter a value.
5. (Optional) In th&#x65;**&#x20;Info** field, enter a value.
6. Repeat with additional new rules by clicking the **Add new rule** button as needed.

# Step 2: Set Up Trigger

:::hint{type="info"}
**Note**: In Manufacturing Connect version 2.13.0 and later, you can customize the subject and message of the trigger alert with your preferred text in addition to the variables.&#x20;
:::

You can customize the trigger's subject/message contents that will be sent to a recipient. The visibility of the *Subject* and *Message* fields are dependent on the *Source* selection from Step 1.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Z3iTQpD3VpJx450-bmH_Y_image.png" size="80" width="1919" height="296" position="center" caption="Metrics version" showCaption="true"}

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Ms2wwkfQqzBBJqCso_7fK_image.png" size="80" width="1919" height="557" position="center" caption="Events version" showCaption="true"}

## Subject and Message Variables

You can select from the following variables in the trigger subject and message:

- **$devicename**: The name of the associated edge device . (For example: Manufacturing Connect Edge (08:00:23:18\:r5:32).
- **$name**: The name of the associated connector or DeviceHub device. (For example: PLC\_2)
- **$alertDelay**: The alert delay parameter configured for the trigger.&#x20;
- **$value**: The current value associated with the connector or DeviceHub device that is being monitored. (For example: connector disk buffer of 98MB)
- **$company**: The company associated with the edge device for the trigger.&#x20;
- **$deviceid**: The associated edge device ID. (For example: 9udklweoidslsdd0lksdjfslkd)
- **$project**: The project associated with the edge device for the trigger.&#x20;
- **$targetValue**: The target value configured for the trigger. (For example: 50MB for Connector disk buffer)
- **$componentid**: The associated component for the event trigger: cc - Integrations, mp - Marketplace, dh - Device Hub, or auth - Auth.&#x20;
- **$message**: The associated event message for the trigger.&#x20;
- **$triggerid**: The associated trigger ID.&#x20;
- **$hostname**: The associated host name for the trigger.&#x20;
- **$tags**: The associated tags for the trigger.&#x20;
- **$severity**: The severity level selected for the trigger: Info, Warning, or Alert.&#x20;
- **$triggername**: The name configured for the trigger.&#x20;
- **$type**: The associated event type for the trigger.&#x20;
- **$eventid**: The event ID associated with the trigger.&#x20;

**To set up the trigger**:

1. In th&#x65;**&#x20;Name** field, enter a name for the trigger.&#x20;
2. (Optional) Click the **Active&#x20;**&#x63;heck box to set an active trigger flag.
3. (Optional) Click the **Dashboard&#x20;**&#x63;heck box to show trigger alerts on dashboard.
4.   In the **Description** field, enter a description for the trigger.
5. In the **Subject&#x20;**&#x66;ield, select one or more variables. In Manufacturing Connect version 2.13.0 and later, you can enter your preferred text in addition to selected variables.&#x20;
6. In the **Message&#x20;**&#x66;ield, select one or more variables. In Manufacturing Connect version 2.13.0 and later, you can enter your preferred text in addition to selected variables.&#x20;

# Step 3: Set Up Scope

You can customize the scope of the user triggers. This will determine the applicable edge device(s) that will receive this alert trigger.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/B6T6M72W6nkmgDWF0yruA_image.png" size="80" width="1917" height="190" position="center" caption="Scope section" showCaption="true"}

**To set up the scope**:

- From the **Scope** section, select an option  . &#x20;
  - **All edge devices**
  - **Edge Device**. From the **Edge Device** drop-down list, select an edge device.
  - **Instance Metrics:&#x20;**&#x44;efine alerts for expiring API tokens.

# Step 4: Set Up Action

You must create an action to use this section. You can select the response action that will immediately occur after the alert is triggered.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/p2ryRl-PBmV_JB8s7cxMp_image.png" size="80" width="1664" height="229" position="center" caption="Action section" showCaption="true"}

**To set up the action**:

1. Select an option from the **Action List** drop-down list.
2. (Optional) Select the **Continuously&#x20;**&#x63;heck box.
   - If you have checked **Continuously**, enter a value in the **Notification Period** field in minutes.
3. Click **Save**.   &#x20;The alert trigger appears in the *Trigger&#x20;*&#x4C;ist.

:::hint{type="info"}
**Important:&#x20;**&#x54;o continue receiving incident notifications for the same condition, you must resolve the current incident first. After clicking *Resolve Incident*, a notification will be sent confirming the resolution.
:::



