Watching backups: alerts, reports, and a vault attackers can't empty
A backup that silently stopped working three weeks ago is the most common way to "have backups" and still lose data. Agents break, VMs get moved, policies get edited, someone removes protection "for a migration". This lesson makes backup failures page someone, turns the backup estate into a report you can query, and hardens the vault itself. Ransomware gangs delete backups before they encrypt anything.
Need to know:
- Azure Backup raises built-in Azure Monitor alerts, no alert rule needed: · job failure alerts (Sev1): Backup Failure, Restore Failure. On by default, can be turned off per vault, and not raised when the VM itself was deleted; · security alerts (Sev0): Delete Backup Data, Soft Delete Disabled for Vault, shorter retention, MUA disabled... Always on.
- Built-in alerts notify nobody until an alert processing rule with Add action groups, scoped to the vault (or its resource group / subscription), routes them to an action group.
- The old classic alerts (the vault's Backup Alerts tab with email settings) are deprecated (31 March 2026). Notifications go through Azure Monitor now.
- Reports: a vault's diagnostic settings send backup data to a Log Analytics workspace. Use the resource-specific tables (
AddonAzureBackupJobs,CoreAzureBackup,AddonAzureBackupPolicy...), which the Backup Reports workbook and your KQL read. Resiliency (the former Backup center / Business Continuity Center) shows jobs, alerts and items across vaults.
Routing the alerts
$ az vm list -g rg-try-bk --query "[].name" -o tsv
vm-try-app
$ az backup vault create -g rg-try-bk -n rsv-try -l westeurope -o none
$ az backup protection enable-for-vm -g rg-try-bk -v rsv-try --vm vm-try-app --policy-name EnhancedPolicy -o none
$ az backup vault show -g rg-try-bk -n rsv-try --query "properties.monitoringSettings"
{
"azureMonitorAlertSettings": {
"alertsForAllJobFailures": "Enabled"
},
"classicAlertSettings": {
"alertsForCriticalOperations": "Disabled"
}
}
$ az monitor action-group create -g rg-try-bk -n ag-try-backup --short-name backup --action email oncall [email protected] -o none
$ VAULT=$(az backup vault show -g rg-try-bk -n rsv-try --query id -o tsv)
$ az monitor alert-processing-rule create -g rg-try-bk -n route-backup-alerts --rule-type AddActionGroups --action-groups ag-try-backup --scopes $VAULT --description "Backup alerts to on-call" --query "{name:name, actions:properties.actions[0].actionType, scopes:properties.scopes}"
{
"actions": "AddActionGroups",
"name": "route-backup-alerts",
"scopes": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-try-bk/providers/Microsoft.RecoveryServices/vaults/rsv-try"
]
}
alertsForAllJobFailures: Enabled is the per-vault switch for job failure alerts (and the classic alerts are off). Nothing more to configure on the vault: the routing lives in Azure Monitor, so one alert processing rule at the subscription can cover every vault in it.
Now a backup that fails. This lesson's VM, vm-try-app, has a VM agent that stopped answering (the most common cause of VM backup failures), so the next backup job fails, and the alert reaches the action group:
$ az backup protection backup-now -g rg-try-bk -v rsv-try -c vm-try-app -i vm-try-app --backup-management-type AzureIaasVM -o none
$ az backup job wait -g rg-try-bk -v rsv-try -n $(az backup job list -g rg-try-bk -v rsv-try --operation Backup --query "[0].name" -o tsv) --query "properties.{status:status, error:errorDetails[0].errorCode}"
{
"error": "UserErrorGuestAgentStatusUnavailable",
"status": "Failed"
}
$ az backup job list -g rg-try-bk -v rsv-try --status Failed --query "[].{operation:properties.operation, item:properties.entityFriendlyName, error:properties.errorDetails[0].errorCode}" -o table
Operation Item Error
--------- ---------- ------------------------------------
Backup vm-try-app UserErrorGuestAgentStatusUnavailable
$ mail -H
N 1 Microsoft Azure Tue Sep 22 20:00 17/769 You've been added to an Azure Monitor ac
>N 2 Microsoft Azure Tue Sep 22 20:25 28/1272 Fired:Sev1 Azure Monitor Alert Backup Fa
Reports: the backup estate in Log Analytics
$ LAW=$(az monitor log-analytics workspace show -g rg-oncall-lab -n law-sysop --query id -o tsv)
$ az monitor diagnostic-settings create -n backup-reports --resource $VAULT --workspace $LAW --export-to-resource-specific --logs '[{"category":"CoreAzureBackup","enabled":true},{"category":"AddonAzureBackupJobs","enabled":true},{"category":"AddonAzureBackupPolicy","enabled":true}]' --query "{name:name, destination:logAnalyticsDestinationType}"
{
"destination": "Dedicated",
"name": "backup-reports"
}
$ W=$(az monitor log-analytics workspace show -g rg-oncall-lab -n law-sysop --query customerId -o tsv)
$ az monitor log-analytics query -w "$W" --analytics-query 'AddonAzureBackupJobs | where JobOperation == "Backup" | summarize jobs = count(), failed = countif(JobStatus == "Failed") by VaultName' -o table
TableName VaultName Failed Jobs
------------- --------- ------ ----
PrimaryResult rsv-try 1 1
$ az monitor log-analytics query -w "$W" --analytics-query 'AddonAzureBackupJobs | where JobStatus == "Failed" | project TimeGenerated, JobOperation, JobFailureCode, BackupItemUniqueId' -o table
BackupItemUniqueId JobFailureCode JobOperation TableName TimeGenerated
-------------------------------------------------------------------------------------- ------------------------------------ ------------ ------------- ------------------------
westeurope;9c2cadf7-101f-40f6-8b37-e98e0970adcb;iaasvmcontainerv2;rg-try-bk;vm-try-app UserErrorGuestAgentStatusUnavailable Backup PrimaryResult 2026-09-22T20:25:26.350Z
--export-to-resource-specificwrites one table per category (AddonAzureBackupJobs...). Without it everything goes to the sharedAzureDiagnosticstable, which the Backup Reports workbook doesn't use.- Data shows up a little later than the job (the reports are not real-time), so they are for trends and audits: "which items failed more than twice this week", "which VMs have no backup in 3 days", storage consumed per policy. For paging, use the built-in alerts.
- A log search alert on this table (Azure III) covers what the built-in alerts don't, for example "no successful backup for an item in 26 hours".
A vault attackers can't empty
The playbook against backups: get an admin account, disable soft delete, delete the backup data, then encrypt production. Each layer below breaks one step:
| Control | Stops |
|---|---|
| Soft delete (14-180 days), always-on (can't be disabled again) | instant deletion of backup data |
| Immutable vault (locked) | deleting recovery points before they expire, shortening retention |
| Multi-user authorization (MUA) with a Resource Guard in another tenant/subscription | one admin alone changing critical settings: a second person must approve via the guard |
| Security alerts (Sev0) routed to people who answer | deleting quietly |
| Separate RBAC: Backup Operator / Backup Reader for daily work, few Backup Contributors | over-privileged day-to-day accounts |
| Private endpoints and public network access disabled on the vault | reaching the vault from the internet |
$ az backup vault backup-properties show -g rg-try-bk -n rsv-try --query "[0].properties.{softDelete:softDeleteFeatureState, days:softDeleteDuration, enhancedSecurity:enhancedSecurityState}"
{
"days": 14,
"enhancedSecurity": "Enabled",
"softDelete": "Enabled"
}
$ az backup vault backup-properties set -g rg-try-bk -n rsv-try --soft-delete-duration 30 --query "[0].properties.softDeleteDuration" -o tsv
30
On the exam (AZ-104 5.2.7): built-in Azure Monitor alerts for Backup (job failure Sev1, security Sev0), routing them with alert processing rules and action groups, classic alerts deprecated, diagnostic settings to Log Analytics with resource-specific tables, Backup Reports, Resiliency / the Backup center views, plus soft delete and vault security.
In an interview: "A backup has been failing for weeks and nobody noticed. What do you change?" - "Route the built-in Backup Failure and security alerts to on-call with an alert processing rule and an action group, at the subscription so every new vault is covered. Send the vaults' diagnostics to Log Analytics in resource-specific mode, and add a log alert for items with no successful backup in the last day. Then schedule restore tests, because a successful job still doesn't prove the data is usable."
What you can now do
- Route built-in backup alerts to an action group, and say why nothing arrives without the rule.
- Send vault diagnostics to Log Analytics and query backup jobs.
- Harden a vault against deletion: soft delete, immutability, MUA, alerts, least privilege.