Azure Backup Center - SQL in Azure VM - Backup Alerts for monitoring

358 Views Asked by At

In Azure Backup Center, we have set up SQL in Azure VM backup jobs for our sql databases. I can see the backup jobs in the backup center. Also in the Recovery Services vault I find the jobs under Backup Items - Sql in Azure VM. In Azure Monitor - Activity log, I only get (success and/or failure) information about the Azure Virtual machines backup. Succes information about the SQL jobs can't be found, unless we start the job manually.

Is there a way to get success information about SQL backup jobs in monitor? Maybe through Diagnostic setting or Log Analytics workspace?   

1

There are 1 best solutions below

0
vijaya On BEST ANSWER

AFAIK Azure Monitor does provide success information for SQL backup jobs.

To obtain success information regarding SQL backup jobs in Azure Monitor you can use the Diagnostic Settings or Log Analytics workspace.

enter image description here It may helps refer this document and use this query as mentioned in document.

  • All successful SQL log backup jobs

   AddonAzureBackupJobs
      | where JobOperation=="Backup" and JobOperationSubType=="Log"
      | summarize arg_max(TimeGenerated,*) by JobUniqueId
      | where JobStatus=="Completed"
      | join kind=inner
      (
          CoreAzureBackup
          | where OperationName == "BackupItem"
          | where BackupItemType=="SQLDataBase" and BackupManagementType=="AzureWorkload"
          | distinct BackupItemUniqueId, BackupItemFriendlyName
      )
      on BackupItemUniqueId