Skip to content

Commit 05ad75d

Browse files
committed
revert a change
1 parent e0a5a13 commit 05ad75d

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

articles/azure-resource-manager/bicep/scenarios-monitoring.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create monitoring resources by using Bicep
33
description: Describes how to create monitoring resources by using Bicep.
44
ms.topic: how-to
55
ms.custom: devx-track-bicep
6-
ms.date: 03/17/2025
6+
ms.date: 09/26/2024
77
---
88

99
# Create monitoring resources by using Bicep
@@ -174,7 +174,41 @@ Alert processing rules (previously referred to as action rules) allow you to app
174174
Each alert processing rule has a scope, which could be a list of one or more specific resources, a specific resource group or your entire Azure subscription. When you define alert processing rules in Bicep, you define a list of resource IDs in the *scope* property, which targets those resources for the alert processing rule.
175175

176176
```bicep
177+
param alertRuleName string = 'AlertRuleName'
178+
param actionGroupName string = 'On-Call Team'
179+
param location string = resourceGroup().location
180+
181+
resource actionGroup 'Microsoft.Insights/actionGroups@2023-09-01-preview' existing = {
182+
name: actionGroupName
183+
}
177184
185+
resource alertProcessingRule 'Microsoft.AlertsManagement/actionRules@2023-05-01-preview' = {
186+
name: alertRuleName
187+
location: location
188+
properties: {
189+
actions: [
190+
{
191+
actionType: 'AddActionGroups'
192+
actionGroupIds: [
193+
actionGroup.id
194+
]
195+
}
196+
]
197+
conditions: [
198+
{
199+
field: 'MonitorService'
200+
operator: 'Equals'
201+
values: [
202+
'Azure Backup'
203+
]
204+
}
205+
]
206+
enabled: true
207+
scopes: [
208+
subscription().id
209+
]
210+
}
211+
}
178212
```
179213

180214
In the preceding example, the `MonitorService` alert processing rule on Azure Backup Vault is defined, which is applied to the existing action group. This rule triggers alerts to the action group.

0 commit comments

Comments
 (0)