Skip to content

Commit 99aed73

Browse files
authored
Merge pull request #291484 from AbhishekMallick-MS/Dec-5-2024-Alerts1
Notification - Restructure
2 parents c2b8382 + df9a767 commit 99aed73

File tree

1 file changed

+8
-149
lines changed

1 file changed

+8
-149
lines changed
Lines changed: 8 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
2-
title: Switch to Azure Monitor based alerts for Azure Backup
3-
description: This article describes the new and improved alerting capabilities via Azure Monitor and the process to configure Azure Monitor.
2+
title: Back up Classic Alerts using Azure Backup
3+
description: Learn how to back up Classic Alerts in the Azure Recovery Services vault.
44
ms.topic: how-to
5-
ms.date: 11/30/2024
5+
ms.date: 12/30/2024
66
ms.service: azure-backup
77
author: AbhishekMallick-MS
88
ms.author: v-abhmallick
99
ms.custom: engagement-fy24
1010
---
1111

12-
# Switch to Azure Monitor based alerts for Azure Backup
12+
# Back up Classic Alerts using Azure Backup
1313

14-
Azure Backup now provides new and improved alerting capabilities via Azure Monitor. If you're using the older [classic alerts solution](#backup-alerts-in-recovery-services-vault) for Recovery Services vaults, we recommend you move to Azure Monitor alerts.
14+
This article describes how to back up Classic Alerts in the Azure Recovery Services vault.
15+
16+
>[!Important]
17+
>Azure Backup now provides new and improved alerting capabilities via Azure Monitor. If you're using the older [classic alerts solution](#backup-alerts-in-recovery-services-vault) for Recovery Services vaults, we recommend you move to Azure Monitor alerts.
1518
1619
## Backup alerts in Recovery Services vault
1720

@@ -95,151 +98,7 @@ To inactivate/resolve an active alert, you can select the list item correspondin
9598

9699
:::image type="content" source="./media/backup-azure-monitoring-laworkspace/vault-alert-inactivate.png" alt-text="Screenshot showing how to inactivate alerts via Backup center.":::
97100

98-
## Suppress notifications during a planned maintenance window
99-
100-
For certain scenarios, you might want to suppress notifications for a particular window of time when backups are going to fail. This is especially important for database backups, where log backups could happen as frequently as every 15 minutes, and you don't want to receive a separate notification every 15 minutes for each failure occurrence. In such a scenario, you can create a second alert processing rule that exists alongside the main alert processing rule used for sending notifications. The second alert processing rule won't be linked to an action group, but is used to specify the time for notification types that should be suppressed.
101-
102-
By default, the suppression alert processing rule takes priority over the other alert processing rule. If a single fired alert is affected by different alert processing rules of both types, the action groups of that alert will be suppressed.
103-
104-
To create a suppression alert processing rule, follow these steps:
105-
106-
1. Go to **Backup center** > **Alerts**, and select **Alert processing rules**.
107-
108-
:::image type="content" source="./media/move-to-azure-monitor-alerts/alert-processing-rule-blade-inline.png" alt-text="Screenshot showing alert processing rules blade in portal." lightbox="./media/move-to-azure-monitor-alerts/alert-processing-rule-blade-expanded.png":::
109-
110-
1. Select **Create**.
111-
112-
:::image type="content" source="./media/move-to-azure-monitor-alerts/alert-processing-rule-create.png" alt-text="Screenshot showing creation of new alert processing rule.":::
113-
114-
1. Select **Scope**, for example, subscription or resource group, that the alert processing rule should span.
115-
116-
You can also select more granular filters if you want to suppress notifications only for a particular backup item. For example, if you want to suppress notifications for *testdb1* database in the Virtual Machine *VM1*, you can specify filters "where Alert Context (payload) contains `/subscriptions/00000000-0000-0000-0000-0000000000000/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/VM1/providers/Microsoft.RecoveryServices/backupProtectedItem/SQLDataBase;MSSQLSERVER;testdb1`".
117-
118-
To get the required format of your required backup item, see the *SourceId field* from the [Alert details page](backup-azure-monitoring-alerts.md#view-fired-alerts-in-the-azure-portal).
119-
120-
:::image type="content" source="./media/move-to-azure-monitor-alerts/alert-processing-rule-scope.png" alt-text="Screenshot showing specified scope of alert processing rule.":::
121-
122-
1. Under **Rule Settings**, select **Suppress notifications**.
123-
124-
:::image type="content" source="./media/move-to-azure-monitor-alerts/alert-processing-rule-settings.png" alt-text="Screenshot showing alert processing rule settings.":::
125-
126-
1. Under **Scheduling**, select the window of time for which the alert processing rule will apply.
127-
128-
:::image type="content" source="./media/move-to-azure-monitor-alerts/alert-processing-rule-schedule.png" alt-text="Screenshot showing alert processing rules scheduling.":::
129-
130-
1. Under **Details**, specify the subscription, resource group, and name under that the alert processing rule should be created.
131-
132-
:::image type="content" source="./media/move-to-azure-monitor-alerts/alert-processing-rule-details.png" alt-text="Screenshot showing alert processing rules details.":::
133-
134-
1. Select **Review+Create**.
135-
136-
If your suppression windows are one-off scenarios and not recurring, you can **Disable** the alert processing rule once you don't need it anymore. You can enable it again in future when you have a new maintenance window in the future.
137-
138-
## Programmatic options
139-
140-
You can also use programmatic methods to opt-out of classic alerts and manage Azure Monitor notifications.
141-
142-
### Opt out of classic backup alerts
143-
144-
In the following sections, you'll learn how to opt out of classic backup alert solution using the supported clients.
145-
146-
#### Using Azure Resource Manager (ARM)/ Bicep/ REST API/ Azure Policy
147-
148-
The **monitoringSettings** vault property helps you specify if you want to disable classic alerts. You can create a custom ARM/Bicep template or Azure Policy to modify this setting for your vaults.
149-
150-
The following example of the vault settings property shows that the classic alerts are disabled and built-in Azure Monitor alerts are enabled for all job failures.
151-
152-
```json
153-
{
154-
"monitoringSettings": {
155-
"classicAlertsForCriticalOperations": "Disabled",
156-
"azureMonitorAlertSettings": {
157-
"alertsForAllJobFailures": "Enabled"
158-
}
159-
}
160-
}
161-
```
162-
163-
#### Using Azure PowerShell
164-
165-
To modify the alert settings of the vault, use the [Update-AzRecoveryServicesVault](/powershell/module/az.recoveryservices/update-azrecoveryservicesvault) command.
166-
167-
The following example helps you to enable built-in Azure Monitor alerts for job failures and disables classic alerts:
168-
169-
```azurepowershell
170-
Update-AzRecoveryServicesVault -ResourceGroupName testRG -Name testVault -DisableClassicAlerts $true -DisableAzureMonitorAlertsForJobFailure $false
171-
```
172-
173-
### Using Azure CLI
174-
175-
To modify the alert settings of the vault, use the [az backup vault backup-properties set](/cli/azure/backup/vault/backup-properties?view=azure-cli-latest&preserve-view=true) command.
176-
177-
The following example helps you to enable built-in Azure Monitor alerts for job failures and disables classic alerts.
178-
179-
```azurecli-interactive
180-
az backup vault backup-properties set \
181-
--name testVault \
182-
--resource-group testRG \
183-
--classic-alerts Disable \
184-
--alerts-for-job-failures Enable
185-
```
186-
187-
### Set up notifications for Azure Monitor alerts
188-
189-
You can use the following standard programmatic interfaces supported by Azure Monitor to manage action groups and alert processing rules.
190-
191-
- [Azure Monitor REST API reference](/rest/api/monitor/)
192-
- [Azure Monitor PowerShell reference](/powershell/module/az.monitor/)
193-
- [Azure Monitor CLI reference](/cli/azure/monitor?view=azure-cli-latest&preserve-view=true)
194-
195-
#### Using Azure Resource Manager (ARM)/ Bicep/ REST API
196-
197-
You can use [these sample ARM and Bicep templates](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.recoveryservices/recovery-services-create-alert-processing-rule) that create an alert processing rule and action group associated to all Recovery Services vaults in the selected subscription.
198-
199-
#### Using Azure PowerShell
200-
201-
As described in earlier sections, you need an action group (notification channel) and alert processing rule (notification rule) to configure notifications for your vaults.
202-
203-
To configure the notification, run the following cmdlet:
204-
205-
1. Create an action group associated with an email ID using the [New-AzActionGroupReceiver](/powershell/module/az.monitor/new-azactiongroupreceiver) cmdlet and the [Set-AzActionGroup](/powershell/module/az.monitor/set-azactiongroup) cmdlet.
206-
207-
```powershell
208-
$email1 = New-AzActionGroupReceiver -Name 'user1' -EmailReceiver -EmailAddress '[email protected]'
209-
Set-AzActionGroup -Name "testActionGroup" -ResourceGroupName "testRG" -ShortName "testAG" -Receiver $email1
210-
```
211-
212-
1. Create an alert processing rule that's linked to the above action group using the [Set-AzAlertProcessingRule](/powershell/module/az.alertsmanagement/set-azalertprocessingrule) cmdlet.
213-
214-
```powershell
215-
Set-AzAlertProcessingRule -ResourceGroupName "testRG" -Name "AddActionGroupToSubscription" -Scope "/subscriptions/xxxx-xxx-xxxx" -FilterTargetResourceType "Equals:Microsoft.RecoveryServices/vaults" -Description "Add ActionGroup1 to alerts on all RS vaults in subscription" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/xxxx-xxx-xxxx/resourcegroups/testRG/providers/microsoft.insights/actiongroups/testActionGroup"
216-
```
217-
218-
#### Using Azure CLI
219-
220-
As described in earlier sections, you need an action group (notification channel) and alert processing rule (notification rule) to configure notifications for your vaults.
221-
222-
To configure the same, run the following commands:
223-
224-
1. Create an action group associated with an email ID using the [az monitor action-group create](/cli/azure/monitor/action-group?view=azure-cli-latest&preserve-view=true#az-monitor-action-group-create) command.
225-
226-
```azurecli-interactive
227-
az monitor action-group create --name testag1 --resource-group testRG --short-name testag1 --action email user1 [email protected] --subscription "Backup PM Subscription"
228-
```
229-
230-
1. Create an alert processing rule that is linked to the above action group using the [az monitor alert-processing-rule create](/cli/azure/monitor/alert-processing-rule?view=azure-cli-latest&preserve-view=true#az-monitor-alert-processing-rule-create) command.
231101

232-
```azurecli-interactive
233-
az monitor alert-processing-rule create \
234-
--name 'AddActionGroupToSubscription' \
235-
--rule-type AddActionGroups \
236-
--scopes "/subscriptions/xxxx-xxx-xxxx" \
237-
--filter-resource-type Equals "Microsoft.RecoveryServices/vaults"
238-
--action-groups "/subscriptions/xxxx-xxx-xxxx/resourcegroups/testRG/providers/microsoft.insights/actiongroups/testag1" \
239-
--enabled true \
240-
--resource-group testRG \
241-
--description "Add ActionGroup1 to all RS vault alerts in subscription"
242-
```
243102

244103
## Next steps
245104
Learn more about [Azure Backup monitoring and reporting](monitoring-and-alerts-overview.md).

0 commit comments

Comments
 (0)