Skip to content

Commit a023948

Browse files
Merge pull request #261995 from yairgil/docs-editor/resource-manager-alerts-servic-1703715473
Update resource-manager-alerts-service-health.md
2 parents 68e7754 + 1184d83 commit a023948

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

articles/azure-monitor/alerts/resource-manager-alerts-service-health.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ This article includes samples of [Azure Resource Manager templates](../../azure-
1515
[!INCLUDE [azure-monitor-samples](../../../includes/azure-monitor-resource-manager-samples.md)]
1616

1717

18-
## Template to send service health alerts
19-
The following template creates an action group with an email target and enables all service health notifications for the target subscription. Save this template as `CreateServiceHealthAlert.json`.
18+
## Template for creating service health alert rules
19+
20+
The following template creates a service health alert rule that sends notifications of service health events for the target subscription. Save this template as `CreateServiceHealthAlert.json` and modify it as needed.
21+
22+
Points to note:
23+
24+
1. The 'scopes' of a service health alert rule can only contain a single subscription, which must be the same subscription in which the rule is created. Multiple subscriptions, a resource group, or other types of scope aren't supported.
25+
1. You can create service health alert rules only in the "Global" location.
26+
1. The "properties.incidentType", "properties.impactedServices[*].ServiceName" and "properties.impactedServices[*].ImpactedRegions[*].RegionName" clauses within the rule condition are optional. You can remove these clauses to be notified on events sent for all incident types, all services, and/or all regions, respectively.
27+
1. The service names used in the "properties.impactedServices[*].ServiceName" must be a valid Azure service name. A list of valid names can be retrieved at the [Resource Health Metadata List API](https://learn.microsoft.com/rest/api/resourcehealth/metadata/list)
28+
2029

2130
```json
2231
{
@@ -41,7 +50,7 @@ The following template creates an action group with an email target and enables
4150
"resources": [
4251
{
4352
"type": "microsoft.insights/actionGroups",
44-
"apiVersion": "2019-06-01",
53+
"apiVersion": "2020-10-01",
4554
"name": "[parameters('actionGroups_name')]",
4655
"location": "Global",
4756
"properties": {
@@ -75,6 +84,19 @@ The following template creates an action group with an email target and enables
7584
{
7685
"field": "properties.incidentType",
7786
"equals": "Incident"
87+
},
88+
{
89+
"field": "properties.impactedServices[*].ServiceName",
90+
"containsAny": [
91+
"SQL Database",
92+
"SQL Managed Instance"
93+
]
94+
},
95+
{
96+
"field": "properties.impactedServices[*].ImpactedRegions[*].RegionName",
97+
"containsAny": [
98+
"Australia Central"
99+
]
78100
}
79101
]
80102
},
@@ -84,7 +106,7 @@ The following template creates an action group with an email target and enables
84106
"actionGroupId": "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_name'))]",
85107
"webhookProperties": {}
86108
}
87-
]
109+
]
88110
},
89111
"enabled": true
90112
},
@@ -100,3 +122,4 @@ The following template creates an action group with an email target and enables
100122

101123
- [Get other sample templates for Azure Monitor](../resource-manager-samples.md).
102124
- [Learn more about alert rules](./alerts-overview.md).
125+

0 commit comments

Comments
 (0)