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-troubleshoot.md
+2-54Lines changed: 2 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,9 +164,9 @@ If you have received a notification for an alert (such as an email or an SMS) mo
164
164

165
165
166
166
## Action or notification has an unexpected content
167
-
Action Groups uses two different email providers to ensure email notification delivery. The primary email provider is very resilient and quick but occasionally suffers outages. In this case, the secondary email provider handles email requests. The secondary provider is only a fallback solution. Due to provider differences, an email sent from our secondary provider may have a degraded email experience. The degradation results in slightly different email formatting and content. Since email templates differ in the two systems, maintaining parity across the two systems is not feasible. You can know that you are recieving a degraded experience, if there is a note at the top of your email notification that says:
167
+
Action Groups uses two different email providers to ensure email notification delivery. The primary email provider is very resilient and quick but occasionally suffers outages. In this case, the secondary email provider handles email requests. The secondary provider is only a fallback solution. Due to provider differences, an email sent from our secondary provider may have a degraded email experience. The degradation results in slightly different email formatting and content. Since email templates differ in the two systems, maintaining parity across the two systems is not feasible. You can know that you are receiving a degraded experience, if there is a note at the top of your email notification that says:
168
168
169
-
"This is a degraded email experience. That means the formatting may be off or details could be missing. For more infomration on the degraded email experience, read here."
169
+
"This is a degraded email experience. That means the formatting may be off or details could be missing. For more information on the degraded email experience, read here."
170
170
171
171
If your notification does not contain this note and you have received the alert, but believe some of its fields are missing or incorrect, follow these steps:
172
172
@@ -247,58 +247,6 @@ If you received an error while trying to create, update or delete an [alert proc
247
247
248
248
Check the [alert processing rule documentation](../alerts/alerts-action-rules.md), or the [alert processing rule PowerShell Set-AzActionRule](/powershell/module/az.alertsmanagement/set-azalertprocessingrule) command.
249
249
250
-
## How to Migrate the Get alert summary API to ARG query
251
-
252
-
Get alert summary API return the summary of alerts using API, today once we opened the option to use ARG query everywhere (including alerts) you can use ARG query directly and by that to have an option to be more flexible.
253
-
If you are using “GetAlertSummary” API, we recommend using ARG query API and list out the benefits
254
-
* Ability to add new fields to the query that returns the alert summary.
255
-
* Ability to be more flexible in the query that returns the alert summary.
256
-
This is an example of how today we use “GetAlertSummary” API:
257
-
258
-
GET https://management.azure.com/subscriptions/{subId}/providers/Microsoft.AlertsManagement/alertsSummary?groupby=severity,alertState&api-version=2019-03-01
259
-
Response: AlertSummary_Sev_Alertstate
260
-
261
-
Instead of “GetAlertSummary” API you can create a query via ARG, examples for 2 uses of ARG query that can be used instead of “GetAlertSummary” API using different parameters. You can use this as a baseline for your query and build it exactly according to your needs.
262
-
* Query to ARG by Severity, AlertState:
263
-
Post https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2020-04-01-preview
264
-
{
265
-
query: "alertsmanagementresources
266
-
| where type =~ 'microsoft.alertsmanagement/alerts'
267
-
| where todatetime(properties.essentials.startDateTime) >= ago(2h) and todatetime(properties.essentials.startDateTime) < now()
title: Migrate from the Azure Monitor alertsSummary API
3
+
description: Find out how to migrate from the Azure Monitor alertsSummary API, which is being deprecated
4
+
ms.topic: how-to
5
+
ms.date: 09/21/2023
6
+
ms.author: abbyweisberg
7
+
---
8
+
9
+
10
+
# Migrate from the alertsSummary API to ARG queries
11
+
12
+
The [alertsSummary API](/rest/api/monitor/alertsmanagement/alerts/get-summary) is being deprecated as of September 30,2026. Instead of the alertsSummary API, you can use Azure Resource Graph queries to get the same information.
13
+
14
+
Azure Resource Graph queries provide flexibility to query your Azure data and can be used for Azure monitor alerts instead of the alertsSummary API.
15
+
16
+
Azure Resource Graph queries provide more functionality than the alertsSummary API, including:
17
+
* The ability to add new fields to the query that returns the alert summary.
18
+
* The ability to be more flexible in the query that returns the alert summary.
19
+
20
+
## Implementation of the current alertsSummary API:
21
+
22
+
This is the format for the calling the alertsSummary API:
This is an example of the output from the alertsSummary API:
29
+
30
+
```json
31
+
{
32
+
"totalRecords": 2,
33
+
"count": 2,
34
+
"data": {
35
+
"columns": [
36
+
{"name": "Severity",
37
+
"type": "string"
38
+
},
39
+
{"name": "AlertState",
40
+
"type": "string"
41
+
},
42
+
{
43
+
"name": "AlertsCount",
44
+
"type": "integer"
45
+
}
46
+
],
47
+
"rows": [
48
+
[
49
+
"Sev2",
50
+
"New",
51
+
2
52
+
],
53
+
[
54
+
"Sev1",
55
+
"New",
56
+
8
57
+
]
58
+
]
59
+
},
60
+
"facets": [],
61
+
"resultTruncated": false
62
+
}
63
+
```
64
+
65
+
## Use the Azure Resource Graph query
66
+
67
+
Use these Azure Resource Graph queries instead of the alertsSummary API call to retrieve alert information, or use these queries as a basis for designing your own queries.
68
+
69
+
-[List Azure Monitor alerts ordered by severity](../../governance/resource-graph/samples/starter.md#list-azure-monitor-alerts-ordered-by-severity)
70
+
-[List Azure Monitor alerts ordered by severity and alert state](../../governance/resource-graph/samples/starter.md#list-azure-monitor-alerts-ordered-by-severity-and-alert-state)
71
+
-[List Azure Monitor alerts ordered by severity, monitor service, and target resource type](../../governance/resource-graph/samples/starter.md#list-azure-monitor-alerts-ordered-by-severity-monitor-service-and-target-resource-type)
72
+
73
+
This is an example of the output from the Azure Resource Graph query:
-[List alerts by severity and resource type](#alerts-severity-state)
36
-
-[List alerts by severity and resource type with a specific tag](#alerts-severity-service-type)
34
+
-[List alerts by severity](#list-azure-monitor-alerts-ordered-by-severity)
35
+
-[List alerts by severity and resource type](#list-azure-monitor-alerts-ordered-by-severity-and-alert-state)
36
+
-[List alerts by severity and resource type with a specific tag](#list-azure-monitor-alerts-ordered-by-severity-monitor-service-and-target-resource-type)
37
37
38
38
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free)
39
39
before you begin.
@@ -657,7 +657,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.network/networksecur
657
657
658
658
---
659
659
660
-
## <aname="alerts-severity"></a>List alerts ordered by severity
660
+
## List Azure Monitor alerts ordered by severity
661
661
662
662
```kusto
663
663
alertsmanagementresources
@@ -667,7 +667,7 @@ alertsmanagementresources
667
667
| summarize AlertsCount = count() by Severity
668
668
669
669
```
670
-
## <aname="alerts-severity-state"></a>List alerts ordered by severity and alert state
670
+
## List Azure Monitor alerts ordered by severity and alert state
671
671
672
672
```kusto
673
673
alertsmanagementresources
@@ -678,7 +678,7 @@ alertsmanagementresources
678
678
| summarize AlertsCount = count() by Severity, AlertState
679
679
```
680
680
681
-
## <aname="alerts-severity-service-type"></a>List alerts ordered by severity, monitor service, and target resource type
681
+
## List Azure Monitor alerts ordered by severity, monitor service, and target resource type
0 commit comments