Sql-server – Azure Managed Instance – Is it possible to send Sql Logs To Log Analytics

azureazure-sql-databaseazure-sql-managed-instancesql server

Is it possible to stream a Managed Instances SQL logs into log analytics?

I need a single location for all Azure based monitoring so that multiple teams have visibility/access to log information for issue investigation.

The idea being that if there is ever a failover we don't have any gaps in our SQL Logs as well as having a single location to view this information.

Best Answer

Use the process described in Add Azure Monitor solutions from the Solutions Gallery to add the Azure SQL Analytics (Preview) solution to your Log Analytics workspace.

Once you have created Azure SQL Analytics solution in your workspace, you need to configure the Managed Instance that you want to monitor to stream its diagnostics telemetry to the solution. Follow detailed instructions on this page.

When you add the solution to your workspace, the Azure SQL Analytics tile is added to your workspace, and it appears in Overview. Select View Summary link to load the tile content

enter image description here

Once loaded, the tile shows the number of Azure SQL databases, elastic pools, Managed Instances, and databases in Managed instances that the solution is receiving diagnostics telemetry from.

enter image description here

The solution provides two separate views -- one for monitoring Azure SQL Databases and elastic pools, and the other view for monitoring Managed Instance, and databases in Managed Instances.

To view Azure SQL Analytics monitoring dashboard for Azure SQL Databases and elastic pools, click on the upper part of the tile. To view Azure SQL Analytics monitoring dashboard for Managed Instance, and databases in Managed Instance, click on the lower part of the tile.

Once the Azure SQL Analytics tile for the databases is selected, the monitoring dashboard is shown.

enter image description here