Skip to content

Commit 17294ec

Browse files
Merge pull request #239557 from AbbyMSFT/custom-props
Add details to custom payload section
2 parents dc77be8 + 5a8e449 commit 17294ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

articles/azure-monitor/alerts/alerts-create-new-alert-rule.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,21 +239,23 @@ Alerts triggered by these alert rules contain a payload that uses the [common al
239239
240240
1. On the **Actions** tab, select or create the required [action groups](./action-groups.md).
241241
242-
1. (Optional) If you've configured action groups for this alert rule, you can add custom properties in key:value pairs to the alert payload to add more information to the payload in the <a name="custom-props">**Custom properties**</a> section. Add the property **Name** and **Value** for the custom property you want included in the payload.
242+
1. (Optional) If you've configured action groups for this alert rule, you can add custom properties in key:value pairs to add more information to the alert notification payload in the <a name="custom-props">**Custom properties**</a> section. Add the property **Name** and **Value** for the custom property you want included in the payload.
243243
244244
You can also use custom properties to extract and manipulate data from alert payloads that use the common schema. You can use those values in the action group webhook or logic app.
245245
246-
The format for extracting values from the common schema, use a "$", and then the path of the common schema field inside curly brackets. For example: `${data.essentials.monitorCondition}`.
246+
The format for extracting values from the [common schema](alerts-common-schema.md), use a "$", and then the path of the common schema field inside curly brackets. For example: `${data.essentials.monitorCondition}`.
247247
248248
In the following examples, values in the **custom properties** are used to utilize data from the payload:
249249
250250
**Example 1**
251+
This example creates an "Additional Details" tag with data about the "evaluation window start time" and "evaluation window end time".
251252
- **Name:** "Additional Details"
252253
- **Value:** "Evaluation windowStartTime: \${data.alertContext.condition.windowStartTime}. windowEndTime: \${data.alertContext.condition.windowEndTime}"
253254
- **Result:** "AdditionalDetails:Evaluation windowStartTime: 2023-04-04T14:39:24.492Z. windowEndTime: 2023-04-04T14:44:24.492Z"
254255
255256
256257
**Example 2**
258+
This example adds data about the reason the alert was fired or resolved.
257259
- **Name:** "Alert \${data.essentials.monitorCondition} reason"
258260
- **Value:** "\${data.alertContext.condition.allOf[0].metricName} \${data.alertContext.condition.allOf[0].operator} \${data.alertContext.condition.allOf[0].threshold} \${data.essentials.monitorCondition}. The value is \${data.alertContext.condition.allOf[0].metricValue}"
259261
- **Result:** Example results could be something like:

0 commit comments

Comments
 (0)