
{"id":7318,"date":"2020-05-01T07:30:11","date_gmt":"2020-05-01T07:30:11","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/create-alerts-for-long-running-backups-on-azure\/"},"modified":"2026-11-03T19:28:36","modified_gmt":"2026-11-03T19:28:36","slug":"create-alerts-for-long-running-backups-on-azure","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/en-gb\/blogs\/create-alerts-for-long-running-backups-on-azure\/","title":{"rendered":"Create alerts for long-running backups on Azure"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>This post explores how to monitor Microsoft\u00ae&nbsp;Azure\u00ae server backups and, if the backups run long, use Log Analytics to trigger an alert on the servers.<\/p>\n<p>\n<em><strong>Teaser: The post unveils new features of Azure **Backup Report** and Azure Monitor and offers some fancy Kusto Query Language (KQL) operations.<\/strong><\/em><\/p>\n<p>Why should you set an alert for long-running server backups?<\/p>\n<p>DevOps and Azure admin engineers have many virtual machines to manage, routine tasks to perform, and troubleshooting efforts to undertake. You can&#8217;t manually check every function on every VM, so you might miss unexpected behavior such as a long-running Azure backup, which can be serious. Automated alerts call problems to your attention.<\/p>\n<p>To make this topic easy to understand, I am dividing the process into the following three parts:<\/p>\n<ol>\n<li>Enable <strong>Backup Report<\/strong>.<\/li>\n<li>Write a KQL query to check long-running server backups.<\/li>\n<li>Configure an alert for long-running server backups.<\/li>\n<\/ol>\n<p><strong>Enable Backup Report<\/strong><\/p>\n<p><strong>Note: <\/strong>This post assumes you already use <strong>Recovery Services<\/strong> vaults to back up your Azure infrastructure.<\/p>\n<p>Use the following steps to enable an Azure Backup report:<br \/>\n&nbsp;<\/p>\n<p><strong>1. Log in to the portal&nbsp;<\/strong><\/p>\n<p>Log in to the Azure portal, click the <strong>All Services blade<\/strong>, and search for <strong>Recovery Services vaults<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture1_15.png\" alt=\"Azure pic 1\" \/><\/p>\n<p><strong>2. Select a vault<\/strong><\/p>\n<p>Select one of the recovery service vaults on which to enable the&nbsp;<strong>Backup Report&nbsp;<\/strong>and monitor the backup duration.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture2_18.png\" alt=\"azure pic 2\" \/><\/p>\n<p><strong>3. Choose Backup Report<\/strong><\/p>\n<p>Click the recovery vault blade, <strong>Backup Reports<\/strong>, and click <strong>Diagnostics Settings<\/strong>.<\/p>\n<p><strong>Note:<\/strong> The preview <strong>Backup Reports<\/strong>&nbsp;feature might not be available in some regions.<br \/>\n&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture3_13.png\" alt=\"azure pic 3\" \/><\/p>\n<p><strong>4. Configure Backup Report<\/strong><\/p>\n<p>To configure the&nbsp;<strong>Backup Report<\/strong>, click on <strong>Add diagnostic setting<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture4_12.png\" alt=\"azure pic 4\" \/><\/p>\n<p><strong>5. Enable log streaming&nbsp;<\/strong><\/p>\n<p>You can stream backup logs to Azure Event Hubs, a storage account, or <strong>Log Analytics<\/strong>. In this example, I chose <strong>Log Analytics<\/strong>.<\/p>\n<p>To enable backup log streaming, fill in the name of the report, check&nbsp;<strong>Send to Log Analytics<\/strong>, check <strong>AzureBackupReport<\/strong> in the <strong>Log<\/strong>&nbsp;section, and click <strong>Save<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture5_10.png\" alt=\"azure pic 5\" \/><\/p>\n<p>.The portal displays your report, as shown in the following image:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture6_7.png\" alt=\"azure pic 6\" \/><\/p>\n<p><strong>&nbsp;KQL query to monitor server backups<\/strong><\/p>\n<p>This section introduces the following KQL query for long-running Azure server backups:<\/p>\n<p>&nbsp; AzureDiagnostics<br \/>\n&nbsp; &nbsp; | where TimeGenerated &gt; ago(1d)<br \/>\n&nbsp; &nbsp; | where Category == \u201cAzureBackupReport\u201d<br \/>\n&nbsp; &nbsp; | where OperationName == \u201cJob\u201d<br \/>\n&nbsp; &nbsp; | where todouble(DataTransferredInMB_s)&gt;1<br \/>\n&nbsp; &nbsp; | extend Report_Running_Time_UTC= TimeGenerated<br \/>\n&nbsp; &nbsp; | extend Backup_Job_Start_Time = JobStartDateTime_s<\/p>\n<p>&nbsp; &nbsp; \/\/ If you want time in AM or PM format and want to make more readable, uncomment the following line by removing \/\/<\/p>\n<p>&nbsp; &nbsp; \/\/| where (Backup_Job_Start_Time contains \u201cAM\u201d or Backup_Job_Start_Time contains \u201cPM\u201d)<\/p>\n<p>&nbsp;| extend DataTransferedGB = todouble(DataTransferredInMB_s)\/1024<br \/>\n&nbsp; &nbsp; | extend JobDurationHour = todouble(JobDurationInSecs_s)\/3600<br \/>\n&nbsp; &nbsp; | where JobDurationHour &gt; 3<br \/>\n&nbsp; &nbsp; | extend Vault_Name = split(ResourceId, \u2018\/\u2019)[-1]<br \/>\n&nbsp; &nbsp; | extend Server_Name = split(BackupItemUniqueId_s, \u2018;\u2019)[-1]<br \/>\n&nbsp; &nbsp; | project Report_Running_Time_UTC, Backup_Job_Start_Time, SubscriptionId, JobOperation_s, JobStatus_s, DataTransferedGB, JobDurationHour, ResourceGroup, Server_Name, Vault_Name, Level<\/p>\n<p>In case you&#8217;re not familiar with KQL, let me explain the important elements of this query.<\/p>\n<p>The query examines the last day of Azure backup data (`where TimeGenerated &gt; ago(1d)`) to find jobs that took longer than three hours to complete (`where JobDurationHour &gt; 3`).<\/p>\n<p>You can change the number of hours, which is three in this case, to whatever number you consider to be too long.<\/p>\n<p><strong>Configure an alert<\/strong><\/p>\n<p>Glad you made it this far&#8230;read on for the best part!<\/p>\n<p>Use the following steps to set an alert for long-running backups:<\/p>\n<p><strong>1. Open Log Search<\/strong><br \/>\nOpen the <strong>Log Search<\/strong>&nbsp;section of the Log Analytics workspace that you selected during the report configuration.<\/p>\n<p><strong>2. Paste the KQL query<\/strong><\/p>\n<p>Copy and paste the preceding KQL query in the <strong>Query<\/strong>&nbsp;tab and click <strong>Run<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture7_5.png\" alt=\"Azure Pic 7\" \/><\/p>\n<p>&nbsp;Servers that took longer than three hours to complete display, as shown in the following output:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture8_4.png\" alt=\"azure pic 8\" \/><\/p>\n<p><strong>3. Create a new alert&nbsp;<\/strong><\/p>\n<p>To set an alert for these servers, click <strong>New Alert Rule<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture9_5.png\" alt=\"azure pic 9\" \/><\/p>\n<p><strong>4. Configure the new alert<\/strong><\/p>\n<p>Under <strong>Condition<\/strong>, enter the threshold value with the count. I chose <strong>1<\/strong>&nbsp;because I want to create an alert on every server and result.<\/p>\n<p><strong>Note<\/strong>: You can also change the <strong>Period<\/strong> and <strong>Frequency<\/strong>&nbsp;of the alert, as needed.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26390-body-Picture10_2.png\" alt=\"azure pic 10\" \/><\/p>\n<p>Configure other alert requirements, such as alert name, action group (email,&nbsp;recipient), webhooks, and other conditions.&nbsp;<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>That\u2019s all there is to it. This post showed you how to configure an alert on Azure VM backups that take longer than three hours. The alert sends a notification email with all the details. With that information, you can take the appropriate action.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create alerts for long-running backups on Azure<\/p>\n","protected":false},"author":2,"featured_media":7320,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26390","content_type":"blog","created_by":"10130","authored_on":"2023-12-18T08:30:11+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Rackspace Technology Staff","seo_description":"Monitor Azure server backups and optimize operations with Log Analytics alerts, ensuring data availability and reliability.\r\n","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26390-insights_image-microsoft-technical-blog-1-insights.jpg","field_partners":"","rxt_platforms":"Microsoft Azure","product":"","publisheddate":"2020-05-01T07:30:11","rxt_solutions":"Cloud Adoption & Migration, Cloud Management & Operations, Cloud Optimization, Multicloud, Public Cloud","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Long-Running Backups Azure Alerts | Rackspace Technology","field_topics":"","field_slug":"create-alerts-for-long-running-backups-on-Azure","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-7318","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/7318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/comments?post=7318"}],"version-history":[{"count":3,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/7318\/revisions"}],"predecessor-version":[{"id":9401,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/7318\/revisions\/9401"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media\/7320"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media?parent=7318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/categories?post=7318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/tags?post=7318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}