You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/alerts/alerts-logic-apps.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,14 +110,19 @@ In this example, the following steps create a Logic App that uses the [common al
110
110
111
111
:::image type="content" source="./media/alerts-logic-apps/configure-http-request-received.png" alt-text="A screenshot showing the parameters for the http request received step.":::
112
112
113
-
1. (Optional). You can customize the alert notification by extracting information about the resource. You can then include those resource tags in the alert payload and use the information in your logical expressions for sending the notifications. To do this, we will create a variable for the affected resource Ids, and then split the information about the resources into in an array to add to the payload. You can then use these values to customize the alert notification.
113
+
1. (Optional). You can customize the alert notification by extracting information about the affected resource on which the alert fired, e.g. the resource’s tags. You can then include those resource tags in the alert payload and use the information in your logical expressions for sending the notifications. To do this, we will:
114
+
- Create a variable for the affected resource IDs
115
+
- Split the resource ID into in an array so we can use its various elements (e.g. subscription, resource group)
116
+
- Use the Azure Resource Manager connector to read the resource’s metadata.
117
+
- Fetch the resource’s tags which can then be used in subsequent steps of the Logic App.
118
+
114
119
1. Select **+** and **Add an action** to insert a new step.
115
120
1. In the **Search** field, search for and select **Initialize variable**.
116
121
1. In the **Name** field, enter the name of the variable, such as 'AffectedResources'.
117
122
1. In the **Type** field, select **Array**.
118
123
1. In the **Value** field, select **Add dynamic Content**. Select the **Expression** tab, and enter this string: `split(triggerBody()?['data']?['essentials']?['alertTargetIDs'][0], '/')`.
119
124
120
-
:::image type="content" source="./media/alerts-logic-apps/initialize-variable.png" alt-text="A screenshot showing the parameters for the initializing a variable in Logic Apps.":::
125
+
:::image type="content" source="./media/alerts-logic-apps/initialize-variable.png" alt-text="A screenshot showing the parameters for the initializing a variable in Logic Apps.":::
121
126
122
127
1. Select **+** and **Add an action** to insert another step.
123
128
1. In the **Search** field, search for and select **Azure Resource Manager**, and then **Read a resource**.
@@ -130,7 +135,8 @@ In this example, the following steps create a Logic App that uses the [common al
1. The dynamic content now includes tags from the resource that you can use in your notification.
138
+
139
+
The dynamic content now includes tags from the affected resource. You can use those tags when you configure your notifications as described in the following steps.
134
140
135
141
1. Send an email or post a Teams message.
136
142
1. Select **+** and **Add an action** to insert a new step.
0 commit comments