Azure Resource Graph Explorer- Backup jobs monitoring

Siva 646 Reputation points
2022-04-06T14:56:30.837+00:00

Hi Team,

Can you please provide the query for the monitor the running backup job details in Azure Resource Graph Explorer

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,124 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 37,686 Reputation points Microsoft Employee
    2022-04-07T09:26:35.273+00:00

    @Siva Thank you for your post. Happy to answer your question!

    Your ask here is to monitor in-progress backup jobs details through Azure Resource Graph Explorer.
    You can use below query for Recovery Services vault.

    RecoveryServicesResources

    | where type in~ ('microsoft.recoveryservices/vaults/backupjobs')  
      
    | extend vaultName = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs',properties.vaultName,type =~ 'Microsoft.RecoveryServices/vaults/backupJobs',split(split(id, '/Microsoft.RecoveryServices/vaults/')[1],'/')[0],'--')  
      
    | extend friendlyName = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs',strcat(properties.dataSourceSetName , '/', properties.dataSourceName),type =~ 'Microsoft.RecoveryServices/vaults/backupJobs', properties.entityFriendlyName, '--')  
      
    | extend dataSourceType = case(type =~ 'Microsoft.RecoveryServices/vaults/backupJobs',properties.backupManagementType,type =~ 'microsoft.dataprotection/backupVaults/backupJobs',properties.dataSourceType,'--')  
      
    | extend protectedItemName = split(split(properties.backupInstanceId, 'protectedItems')[1],'/')[1]  
      
    | extend vaultId = tostring(split(id, '/backupJobs')[0])  
      
    | extend vaultSub = tostring( split(id, '/')[2])  
      
    | extend jobStatus = properties.status, operation = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs' and tolower(properties.operationCategory) =~ 'backup' and properties.isUserTriggered == 'true',strcat('adhoc',properties.operationCategory),type =~ 'microsoft.dataprotection/backupVaults/backupJobs', tolower(properties.operationCategory), type =~ 'Microsoft.RecoveryServices/vaults/backupJobs' and tolower(properties.operation) =~ 'backup' and properties.isUserTriggered == 'true',strcat('adhoc',properties.operation),type =~ 'Microsoft.RecoveryServices/vaults/backupJobs',tolower(properties.operation), '--'),startTime = todatetime(properties.startTime),endTime = properties.endTime, duration = properties.duration   
      
    | where startTime >= ago(24h)  
      
    | where jobStatus == "InProgress"  
      
    | project vaultSub, vaultId, protectedItemName, startTime, endTime, jobStatus, operation  
    

    Hope this helps!

    ----------------------------------------------------------------------------------------------------------------------

    If the response helped, do "Accept Answer" and up-vote it