Skip to content

Commit c540fa1

Browse files
committed
edit pass: five-articles-for-alerts
1 parent 74a4b9e commit c540fa1

File tree

3 files changed

+211
-158
lines changed

3 files changed

+211
-158
lines changed

articles/azure-monitor/alerts/alerts-common-schema-definitions.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Alert schema definitions in Azure Monitor
3-
description: Understanding the common alert schema definitions for Azure Monitor
3+
description: This article explains the common alert schema definitions for Azure Monitor.
44
author: ofirmanor
55
ms.topic: conceptual
66
ms.date: 07/20/2021
@@ -9,13 +9,15 @@ ms.reviewer: ofmanor
99

1010
# Common alert schema definitions
1111

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 the definitions for webhooks, Azure Logic Apps, Azure Functions, and Azure Automation runbooks.
1313

1414
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+
16+
* **Essentials**: A set of standardized fields that are common across all alert types. Fields describe what resource the alert is on, along with other common alert metadata. Examples are severity or description.
17+
* **Alert context**: A set of fields that describe the cause of the alert. Fields 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.
1718

1819
**Sample alert payload**
20+
1921
```json
2022
{
2123
"schemaId": "azureMonitorCommonAlertSchema",
@@ -71,14 +73,14 @@ Any alert instance describes the resource that was affected and the cause of the
7173

7274
| Field | Description|
7375
|:---|:---|
74-
| alertId | The unique resource ID identifying the alert instance. |
76+
| alertId | The unique resource ID that identifies the alert instance. |
7577
| 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+
| Severity | The severity of the alert. Possible values are Sev0, Sev1, Sev2, Sev3, or Sev4. |
79+
| signalType | Identifies the signal on which the alert rule was defined. Possible values are Metric, Log, or Activity Log. |
7880
| 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**. |
7981
| monitoringService | The monitoring service or solution that generated the alert. The fields for the alert context are dictated by the monitoring service. |
8082
| 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.<br>In some cases, the configuration items can be different from the alert targets. For example, in metric-for-log or log alerts defined on a Log Analytics workspace, the configuration items are the actual resources sending the telemetry, and not the workspace.<br><ul><li>In the log alerts API (Scheduled Query Rules) v2021-08-01, the configurationItem values are taken from explicitly defined dimensions in this priority: 'Computer', '_ResourceId', 'ResourceId', 'Resource'.</li><li>In earlier versions of the log alerts API, the configurationItem values are taken implicitly from the results in this priority: 'Computer', '_ResourceId', 'ResourceId', 'Resource'.</li></ul>In ITSM systems, the configurationItems field is used to correlate alerts to resources in a CMDB. |
83+
| configurationItems |The list of affected resources of an alert.<br>In some cases, the configuration items can be different from the alert targets. For example, in metric-for-log or log alerts defined on a Log Analytics workspace, the configuration items are the actual resources sending the telemetry and not the workspace.<br><ul><li>In the log alerts API (Scheduled Query Rules) v2021-08-01, the `configurationItem` values are taken from explicitly defined dimensions in this priority: `Computer`, `_ResourceId`, `ResourceId`, `Resource`.</li><li>In earlier versions of the log alerts API, the `configurationItem` values are taken implicitly from the results in this priority: `Computer`, `_ResourceId`, `ResourceId`, `Resource`.</li></ul>In ITSM systems, the `configurationItems` field is used to correlate alerts to resources in a configuration management database. |
8284
| originAlertId | The ID of the alert instance, as generated by the monitoring service generating it. |
8385
| firedDateTime | The date and time when the alert instance was fired in Coordinated Universal Time (UTC). |
8486
| 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.|
@@ -87,6 +89,7 @@ Any alert instance describes the resource that was affected and the cause of the
8789
|alertContextVersion | The version number for the `alertContext` section. |
8890

8991
**Sample values**
92+
9093
```json
9194
{
9295
"essentials": {
@@ -110,11 +113,14 @@ Any alert instance describes the resource that was affected and the cause of the
110113

111114
## Alert context
112115

116+
The following fields describe the cause of an alert.
117+
113118
### Metric alerts - Static threshold
114119

115120
#### `monitoringService` = `Platform`
116121

117122
**Sample values**
123+
118124
```json
119125
{
120126
"alertContext": {
@@ -150,6 +156,7 @@ Any alert instance describes the resource that was affected and the cause of the
150156
#### `monitoringService` = `Platform`
151157

152158
**Sample values**
159+
153160
```json
154161
{
155162
"alertContext": {
@@ -186,6 +193,7 @@ Any alert instance describes the resource that was affected and the cause of the
186193
#### `monitoringService` = `Platform`
187194

188195
**Sample values**
196+
189197
```json
190198
{
191199
"alertContext": {
@@ -215,11 +223,12 @@ Any alert instance describes the resource that was affected and the cause of the
215223
### Log alerts
216224

217225
> [!NOTE]
218-
> 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).
226+
> 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. 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, use `LinkToFilteredSearchResultsAPI` or `LinkToSearchResultsAPI` to access query results with the [Log Analytics API](/rest/api/loganalytics/dataaccess/query/get).
219227
220228
#### `monitoringService` = `Log Analytics`
221229

222230
**Sample values**
231+
223232
```json
224233
{
225234
"alertContext": {
@@ -296,6 +305,7 @@ Any alert instance describes the resource that was affected and the cause of the
296305
#### `monitoringService` = `Application Insights`
297306

298307
**Sample values**
308+
299309
```json
300310
{
301311
"alertContext": {
@@ -368,9 +378,10 @@ Any alert instance describes the resource that was affected and the cause of the
368378
#### `monitoringService` = `Log Alerts V2`
369379

370380
> [!NOTE]
371-
> 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.
381+
> 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. 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.
372382
373383
**Sample values**
384+
374385
```json
375386
{
376387
"alertContext": {
@@ -418,6 +429,7 @@ Any alert instance describes the resource that was affected and the cause of the
418429
#### `monitoringService` = `Activity Log - Administrative`
419430

420431
**Sample values**
432+
421433
```json
422434
{
423435
"alertContext": {
@@ -445,6 +457,7 @@ Any alert instance describes the resource that was affected and the cause of the
445457
#### `monitoringService` = `Activity Log - Policy`
446458

447459
**Sample values**
460+
448461
```json
449462
{
450463
"alertContext": {
@@ -508,6 +521,7 @@ Any alert instance describes the resource that was affected and the cause of the
508521
#### `monitoringService` = `Activity Log - Security`
509522

510523
**Sample values**
524+
511525
```json
512526
{
513527
"alertContext": {
@@ -541,6 +555,7 @@ Any alert instance describes the resource that was affected and the cause of the
541555
#### `monitoringService` = `ServiceHealth`
542556

543557
**Sample values**
558+
544559
```json
545560
{
546561
"alertContext": {
@@ -582,9 +597,11 @@ Any alert instance describes the resource that was affected and the cause of the
582597
}
583598
}
584599
```
600+
585601
#### `monitoringService` = `Resource Health`
586602

587603
**Sample values**
604+
588605
```json
589606
{
590607
"alertContext": {
@@ -610,7 +627,6 @@ Any alert instance describes the resource that was affected and the cause of the
610627
}
611628
```
612629

613-
614630
## Next steps
615631

616632
- Learn more about the [common alert schema](./alerts-common-schema.md).

0 commit comments

Comments
 (0)