title | description | ms.date | ms.custom | ms.topic | author | ms.author | ms.reviewer | ms.service | ms.subservice |
---|---|---|---|---|---|---|---|---|---|
Monitor Azure SQL Managed Instance |
Start here to learn how to monitor Azure SQL Managed Instance. |
03/13/2024 |
horz-monitor |
conceptual |
MashaMSFT |
mathoma |
wiassaf |
sql-managed-instance |
monitoring |
[!INCLUDEappliesto-sqlmi]
[!INCLUDE horz-monitor-intro]
In addition to the features in this article, the SQL Server database engine has its own monitoring and diagnostic capabilities that Azure SQL Managed Instance uses, such as query store and dynamic management views (DMVs). For more information, see the following articles:
- Monitor performance by using the Query Store
- Monitor Azure SQL Managed Instance performance using dynamic management views
For a detailed discussion of all monitoring and performance aspects of Azure SQL Managed Instance, see Monitor and performance tuning in Azure SQL Database and Azure SQL Managed Instance. [!INCLUDE horz-monitor-insights]
You can configure Azure Monitor SQL Insights for SQL-specific metrics for Azure SQL Managed Instance, Azure SQL Database, and SQL Server on Azure VMs. For more information about Azure Monitor SQL Insights for all products in the Azure SQL family, see Monitor your SQL deployments with SQL Insights (preview).
For more information on how to use SQL Insights, see the following articles:
- Monitor your SQL deployments with SQL Insights (preview)
- How to enable SQL Insights
- Create alerts with SQL Insights
- Troubleshoot SQL Insights
Intelligent Insights for Azure SQL Database and Azure SQL Managed Instance is different from Azure Monitor SQL Insights. Intelligent Insights uses artificial intelligence to continuously monitor database usage and detect disruptive events that cause poor performance. Intelligent Insights generates a resource log called SQLInsights that provides an intelligent assessment, root cause analysis, and performance improvement recommendations.
For more information, see Intelligent Insights using AI to monitor and troubleshoot database performance (preview) and Use the Intelligent Insights performance diagnostics log.
[!INCLUDE horz-monitor-resource-types] For more information about the resource types for SQL Managed Instance, see SQL Managed Instance monitoring data reference.
[!INCLUDE horz-monitor-data-storage]
[!INCLUDE horz-monitor-platform-metrics] For a list of available metrics for SQL Managed Instance, see SQL Managed Instance monitoring data reference.
[!INCLUDE horz-monitor-resource-logs]
Auditing for Azure SQL Managed Instance tracks database events and writes them to an audit log in your Azure storage account. For more information, see Get started with SQL Managed Instance auditing. For more information on the resource logs and diagnostics available for Azure SQL Managed Instance, see Configure streaming export of diagnostic telemetry.
For the available resource log categories, their associated Log Analytics tables, and the logs schemas for SQL Managed Instance, see SQL Managed Instance monitoring data reference.
[!INCLUDE horz-monitor-activity-log]
[!INCLUDE horz-monitor-analyze-data]
[!INCLUDE horz-monitor-external-tools]
[!INCLUDE horz-monitor-kusto-queries]
Use the following sample queries to help you monitor your Azure SQL Managed Instance.
Example A: Display all managed instances with avg_cpu
utilization over 95%.
let cpu_percentage_threshold = 95;
let time_threshold = ago(1h);
AzureDiagnostics
| where Category == "ResourceUsageStats" and TimeGenerated > time_threshold
| summarize avg_cpu = max(todouble(avg_cpu_percent_s)) by _ResourceId
| where avg_cpu > cpu_percentage_threshold
Example B: Display all managed instances with storage utilization over 90%, dividing storage_space_used_mb_s
by reserved_storage_mb_s
.
let storage_percentage_threshold = 90;
AzureDiagnostics
| where Category =="ResourceUsageStats"
| summarize (TimeGenerated, calculated_storage_percentage) = arg_max(TimeGenerated, todouble(storage_space_used_mb_s) *100 / todouble (reserved_storage_mb_s))
by _ResourceId
| where calculated_storage_percentage > storage_percentage_threshold
[!INCLUDE horz-monitor-alerts]
[!INCLUDE horz-monitor-insights-alerts]
The following table lists common and recommended alert rules for Azure SQL Managed Instance. You may see different options available depending on your purchasing model.
Signal name | Operator | Aggregation type | Threshold value | Description |
---|---|---|---|---|
Average CPU percentage | Greater than | Average | 80 | Whenever the average CPU utilization percentage is greater than 80% |
Resource Health | Current Resource Status | NA | Degraded or Unavailable | Detect resources outages, whether they be Azure initiated or user initiated |
[!INCLUDE horz-monitor-advisor-recommendations]
- See SQL Managed Instance monitoring data reference for a reference of the metrics, logs, and other important values created for SQL Managed Instance.
- See Monitoring Azure resources with Azure Monitor for general details on monitoring Azure resources.