|
1 | 1 | ---
|
2 | 2 | title: Alert schema definitions in Azure Monitor for Test Action Group
|
3 |
| -description: Understanding the common alert schema definitions for Azure Monitor for Test Action group |
| 3 | +description: Understand the common alert schema definitions for Azure Monitor for the Test Action group. |
4 | 4 | author: jacegummersall
|
5 | 5 | ms.topic: conceptual
|
6 | 6 | ms.date: 01/14/2022
|
7 | 7 | ms.revewer: jagummersall
|
8 | 8 | ---
|
9 | 9 |
|
10 |
| -# Common alert schema definitions for Test Action Group (Preview) |
| 10 | +# Common alert schema definitions for Test Action Group (preview) |
11 | 11 |
|
12 |
| -This article describes the [common alert schema definitions](./alerts-common-schema.md) for Azure Monitor, including those for webhooks, Azure Logic Apps, Azure Functions, and Azure Automation runbooks. |
| 12 | +This article describes the [common alert schema definitions](./alerts-common-schema.md) for Azure Monitor. It includes schema definitions for webhooks, Azure Logic Apps, Azure Functions, and Azure Automation runbooks. |
13 | 13 |
|
14 | 14 | Any alert instance describes the resource that was affected and the cause of the alert. These instances are described in the common schema in the following sections:
|
15 |
| -* **Essentials**: A set of standardized fields, common across all alert types, which describe what resource the alert is on, along with additional common alert metadata (for example, severity or description). |
16 |
| -* **Alert context**: A set of fields that describes the cause of the alert, with fields that vary based on the alert type. For example, a metric alert includes fields like the metric name and metric value in the alert context, whereas an activity log alert has information about the event that generated the alert. |
| 15 | +* **Essentials**: A set of standardized fields common across all alert types that describes what resource the alert is on, along with more common alert metadata like severity or description. |
| 16 | +* **Alert context**: A set of fields that describes the cause of the alert, with fields that vary based on the alert type. For example, a metric alert includes fields like the metric name and metric value in the alert context. An activity log alert has information about the event that generated the alert. |
17 | 17 |
|
18 | 18 | **Sample alert payload**
|
19 | 19 | ```json
|
@@ -71,20 +71,20 @@ Any alert instance describes the resource that was affected and the cause of the
|
71 | 71 |
|
72 | 72 | | Field | Description|
|
73 | 73 | |:---|:---|
|
74 |
| -| alertId | The unique resource ID identifying the alert instance. | |
75 |
| -| alertRule | The name of the alert rule that generated the alert instance. | |
76 |
| -| Severity | The severity of the alert. Possible values: Sev0, Sev1, Sev2, Sev3, or Sev4. | |
77 |
| -| signalType | Identifies the signal on which the alert rule was defined. Possible values: Metric, Log, or Activity Log. | |
78 |
| -| monitorCondition | When an alert fires, the alert's monitor condition is set to **Fired**. When the underlying condition that caused the alert to fire clears, the monitor condition is set to **Resolved**. | |
79 |
| -| monitoringService | The monitoring service or solution that generated the alert. The fields for the alert context are dictated by the monitoring service. | |
80 |
| -| alertTargetIds | The list of the Azure Resource Manager IDs that are affected targets of an alert. For a log alert defined on a Log Analytics workspace or Application Insights instance, it's the respective workspace or application. | |
81 |
| -| configurationItems | The list of affected resources of an alert. The configuration items can be different from the alert targets in some cases, e.g. in metric-for-log or log alerts defined on a Log Analytics workspace, where the configuration items are the actual resources sending the telemetry, and not the workspace. This field is used by ITSM systems to correlate alerts to resources in a CMDB. | |
82 |
| -| originAlertId | The ID of the alert instance, as generated by the monitoring service generating it. | |
83 |
| -| firedDateTime | The date and time when the alert instance was fired in Coordinated Universal Time (UTC). | |
84 |
| -| resolvedDateTime | The date and time when the monitor condition for the alert instance is set to **Resolved** in UTC. Currently only applicable for metric alerts.| |
85 |
| -| description | The description, as defined in the alert rule. | |
86 |
| -|essentialsVersion| The version number for the essentials section.| |
87 |
| -|alertContextVersion | The version number for the `alertContext` section. | |
| 74 | +| `alertId` | The unique resource ID that identifies the alert instance. | |
| 75 | +| `alertRule` | The name of the alert rule that generated the alert instance. | |
| 76 | +| `Severity` | The severity of the alert. Possible values: `Sev0`, `Sev1`, `Sev2`, `Sev3`, or `Sev4`. | |
| 77 | +| `signalType` | Identifies the signal on which the alert rule was defined. Possible values: `Metric`, `Log`, or `Activity Log`. | |
| 78 | +| `monitorCondition` | When an alert fires, the alert's monitor condition is set to `Fired`. When the underlying condition that caused the alert to fire clears, the monitor condition is set to `Resolved`. | |
| 79 | +| `monitoringService` | The monitoring service or solution that generated the alert. The fields for the alert context are dictated by the monitoring service. | |
| 80 | +| `alertTargetIds` | The list of the Azure Resource Manager IDs that are affected targets of an alert. For a log alert defined on a Log Analytics workspace or Application Insights instance, it's the respective workspace or application. | |
| 81 | +| `configurationItems` | The list of affected resources of an alert. The configuration items can be different from the alert targets in some cases, for example, in metric-for-log or log alerts defined on a Log Analytics workspace. The configuration items are the actual resources that send the telemetry and not the workspace. This field is used by IT service management systems to correlate alerts to resources in a configuration management database. | |
| 82 | +| `originAlertId` | The ID of the alert instance, as generated by the monitoring service generating it. | |
| 83 | +| `firedDateTime` | The date and time when the alert instance was fired in Coordinated Universal Time (UTC). | |
| 84 | +| `resolvedDateTime` | The date and time when the monitor condition for the alert instance is set to `Resolved` in UTC. Currently, only applicable for metric alerts.| |
| 85 | +| `description` | The description, as defined in the alert rule. | |
| 86 | +|`essentialsVersion`| The version number for the `essentials` section.| |
| 87 | +|`alertContextVersion` | The version number for the `alertContext` section. | |
88 | 88 |
|
89 | 89 | **Sample values**
|
90 | 90 | ```json
|
@@ -112,7 +112,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
112 | 112 |
|
113 | 113 | ### Metric alerts - Static threshold
|
114 | 114 |
|
115 |
| -#### `monitoringService` = `Platform` |
| 115 | +#### monitoringService = Platform |
116 | 116 |
|
117 | 117 | **Sample values**
|
118 | 118 | ```json
|
@@ -180,7 +180,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
180 | 180 |
|
181 | 181 | ### Metric alerts - Dynamic threshold
|
182 | 182 |
|
183 |
| -#### `monitoringService` = `Platform` |
| 183 | +#### monitoringService = Platform |
184 | 184 |
|
185 | 185 | **Sample values**
|
186 | 186 | ```json
|
@@ -249,9 +249,11 @@ Any alert instance describes the resource that was affected and the cause of the
|
249 | 249 | ### Log alerts
|
250 | 250 |
|
251 | 251 | > [!NOTE]
|
252 |
| -> For log alerts that have a custom email subject and/or JSON payload defined, enabling the common schema reverts email subject and/or payload schema to the one described as follows. This means that if you want to have a custom JSON payload defined, the webhook cannot use the common alert schema. Alerts with the common schema enabled have an upper size limit of 256 KB per alert. Search results aren't embedded in the log alerts payload if they cause the alert size to cross this threshold. You can determine this by checking the flag `IncludedSearchResults`. When the search results aren't included, you should use the `LinkToFilteredSearchResultsAPI` or `LinkToSearchResultsAPI` to access query results with the [Log Analytics API](/rest/api/loganalytics/dataaccess/query/get). |
| 252 | +> For log alerts that have a custom email subject and/or JSON payload defined, enabling the common schema reverts email subject and/or payload schema to the one described as follows. This means that if you want to have a custom JSON payload defined, the webhook can't use the common alert schema. |
253 | 253 |
|
254 |
| -#### `monitoringService` = `Log Alerts V1 – Metric` |
| 254 | +Alerts with the common schema enabled have an upper size limit of 256 KB per alert. Search results aren't embedded in the log alerts payload if they cause the alert size to cross this threshold. To determine size, check the flag `IncludedSearchResults`. When the search results aren't included, use `LinkToFilteredSearchResultsAPI` or `LinkToSearchResultsAPI` to access query results with the [Log Analytics API](/rest/api/loganalytics/dataaccess/query/get). |
| 255 | + |
| 256 | +#### monitoringService = Log Alerts V1 – Metric |
255 | 257 |
|
256 | 258 | **Sample values**
|
257 | 259 | ```json
|
@@ -342,7 +344,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
342 | 344 | }
|
343 | 345 | ```
|
344 | 346 |
|
345 |
| -#### `monitoringService` = `Log Alerts V1 - Numresults` |
| 347 | +#### monitoringService = Log Alerts V1 - Numresults |
346 | 348 |
|
347 | 349 | **Sample values**
|
348 | 350 | ```json
|
@@ -431,10 +433,12 @@ Any alert instance describes the resource that was affected and the cause of the
|
431 | 433 | }
|
432 | 434 | ```
|
433 | 435 |
|
434 |
| -#### `monitoringService` = `Log Alerts V2` |
| 436 | +#### monitoringService = Log Alerts V2 |
435 | 437 |
|
436 | 438 | > [!NOTE]
|
437 |
| -> Log alerts rules from API version 2020-05-01 use this payload type, which only supports common schema. Search results aren't embedded in the log alerts payload when using this version. You should use [dimensions](./alerts-unified-log.md#split-by-alert-dimensions) to provide context to fired alerts. You can also use the `LinkToFilteredSearchResultsAPI` or `LinkToSearchResultsAPI` to access query results with the [Log Analytics API](/rest/api/loganalytics/dataaccess/query/get). If you must embed the results, use a logic app with the provided links the generate a custom payload. |
| 439 | +> Log alerts rules from API version 2020-05-01 use this payload type, which only supports common schema. Search results aren't embedded in the log alerts payload when you use this version. Use [dimensions](./alerts-unified-log.md#split-by-alert-dimensions) to provide context to fired alerts. |
| 440 | +
|
| 441 | +You can also use `LinkToFilteredSearchResultsAPI` or `LinkToSearchResultsAPI` to access query results with the [Log Analytics API](/rest/api/loganalytics/dataaccess/query/get). If you must embed the results, use a logic app with the provided links to generate a custom payload. |
438 | 442 |
|
439 | 443 | **Sample values**
|
440 | 444 | ```json
|
@@ -503,7 +507,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
503 | 507 |
|
504 | 508 | ### Activity log alerts
|
505 | 509 |
|
506 |
| -#### `monitoringService` = `Activity Log - Administrative` |
| 510 | +#### monitoringService = Activity Log - Administrative |
507 | 511 |
|
508 | 512 | **Sample values**
|
509 | 513 | ```json
|
@@ -559,7 +563,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
559 | 563 | }
|
560 | 564 | ```
|
561 | 565 |
|
562 |
| -#### `monitoringService` = `ServiceHealth` |
| 566 | +#### monitoringService = ServiceHealth |
563 | 567 |
|
564 | 568 | **Sample values**
|
565 | 569 | ```json
|
@@ -624,7 +628,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
624 | 628 | }
|
625 | 629 | ```
|
626 | 630 |
|
627 |
| -#### `monitoringService` = `Resource Health` |
| 631 | +#### monitoringService = Resource Health |
628 | 632 |
|
629 | 633 | **Sample values**
|
630 | 634 | ```json
|
@@ -675,7 +679,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
675 | 679 | }
|
676 | 680 | ```
|
677 | 681 |
|
678 |
| -#### `monitoringService` = `Budget` |
| 682 | +#### monitoringService = Budget |
679 | 683 |
|
680 | 684 | **Sample values**
|
681 | 685 | ```json
|
@@ -703,7 +707,7 @@ Any alert instance describes the resource that was affected and the cause of the
|
703 | 707 | }
|
704 | 708 | ```
|
705 | 709 |
|
706 |
| -#### `monitoringService` = `Smart Alert` |
| 710 | +#### monitoringService = Smart Alert |
707 | 711 |
|
708 | 712 | **Sample values**
|
709 | 713 | ```json
|
|
0 commit comments