Forum Discussion
Lucas Chies
Jul 20, 2020Copper Contributor
Query for Azure Backup
Hello All, I'm using the below script to get the backup information, but in this script I can't found were or how can I get the error message, error code and the recommendations message. Can any...
- Jul 24, 2020AddonAzureBackupJobs
| where JobOperation=="Backup"
| summarize arg_max(TimeGenerated,*) by JobUniqueId
| where JobStatus=="Completed"
| join kind=inner
(
CoreAzureBackup
| where OperationName == "BackupItem"
| where BackupItemType=="VM" and BackupManagementType=="IaaSVM"
| distinct BackupItemUniqueId, BackupItemFriendlyName
)
on BackupItemUniqueId
I hope this code helps you out.
Lucas Chies
Jul 20, 2020Copper Contributor
Hello CliveWatson
Tks for your help.
So, all scripts doesn't show the recommendation. I'm trying to find this message on the below screen:
I'm trying use the "RecommendedAction_s", but doesn't show any information.
let Events = AzureDiagnostics
| where Category == "AzureBackupReport"; Events
| extend JobOperationSubType_s = columnifexists("JobOperationSubType_s", "")
| where OperationName == "Job" and JobOperation_s == "Backup" and JobStatus_s == "Failed" and JobOperationSubType_s != "Log" and JobOperationSubType_s != "Recovery point_Log"
| distinct JobUniqueId_g, BackupItemUniqueId_s, JobStatus_s, Resource, JobFailureCode_s, JobStartDateTime_s, RecommendedAction_s
| project BackupItemUniqueId_s, JobStatus_s, Resource, JobFailureCode_s, JobStartDateTime_s, RecommendedAction_s
CliveWatson
Jul 22, 2020Former Employee
.
That is an "Alert" operation so you need to add that. ie.
| where OperationName == "Alert"
Amended query:
Amended query:
let Events = AzureDiagnostics
| where Category == "AzureBackupReport";
Events
| extend JobOperationSubType_s = columnifexists("JobOperationSubType_s", "")
| where OperationName == "Alert" or OperationName == "Job"
and JobOperation_s == "Backup" and JobStatus_s == "Failed"
and JobOperationSubType_s !in ("Log","Recovery point_Log")
| distinct JobUniqueId_g, BackupItemUniqueId_s, JobStatus_s, Resource, JobFailureCode_s, JobStartDateTime_s, RecommendedAction_s
| project BackupItemUniqueId_s, JobStatus_s, Resource, JobFailureCode_s, JobStartDateTime_s, RecommendedAction_s
- GBADAROJul 24, 2020Copper Contributor
Hi Clive,
I´m trying to achieve the same here. Tested the amended query, but no luck on getting the Error Message or the Recommended Action yet.
Quest continues...