Tips & Tricks #1: Creating alerts for Azure SQL Managed Instance

This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.

Azure SQL Analytics collects and visualizes key performance metrics with built-in intelligence for performance troubleshooting.

 

By using these collected metrics, you can create custom monitoring rules and alerts. Azure SQL Analytics helps you to identify issues at each layer of your application stack. It uses Azure Diagnostic metrics along with Azure Monitor views to present data about all your Azure SQL databases in a single Log Analytics work-space. Azure Monitor helps you to collect, correlate, and visualize structured and unstructured data. More information can be found here.


Let us Begin:

  1. From Azure Portal search field go to Log Analytics workspaces the click Add, please have a look at the following snapshot:
    1.png

  2. Fill the values then click on OK, please have a look at the following snapshot:
    2.png

  3. Go to your Azure SQL MI that you want to create an alert for it, then click on Diagnostic Settings (Left-menu), please have a look at the following snapshot:
    3.png

  4. From the right-side, click on the Add diagnostic setting and select the Log Analytics work space that you have created above then click on save, please have a look at the following snapshots:
    4_1.png

    4_2.png

  5. Click on the Log Analytic Workspace that we have created, please have a look at the following snapshot:
    5.png

  6. From the right-side, click on view logs under Search and analyze logs, please have a look at the following snapshot:
    6.png
  7. From the Queries dialog, select Topic from the top-left drop down list then Azure diagnostics from All Queries and finally click Load To Editor, please have a look at the following snapshot:
    7.png

  8. Clear the editor and copy the query from here (This query is responsible on monitoring if Azure MI storage is above 90%) then paste it in the editor and click on New alert rule, please have a look at the following snapshot:
    8.png

  9. An alert will be created using the above query, please have a look at the followings snapshot:
    9.png

  10. Click on the condition that you want to add the threshold in, please have a look at the following snapshot:
    10.png
  11. Enter a specific threshold in the Threshold value field, then click Done, please have a look at the followings snapshot:
    11.jpg

  12. In Customize Actions section, select the Email subject and enter your specific email, please have a look at the following snapshot:
    12.png
  13. In Alert Details section, fill alert rule name and description and finally click on Create alert rule button, please have a look at the following snapshot:13.png

  14. To check if the alert created, from the portal search for Alerts then manage alerts, and you will find your created alert, please have a look at the following snapshot:
    14.png

More information can be found in the following documents:

arrow-right-3-10.png Tutorial: Get started with Log Analytics queries
arrow-right-3-10.png Get started with log queries in Azure Monitor

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.