Resource Manager template samples for SQL Insights (preview)

This article includes sample Azure Resource Manager templates to enable SQL Insights (preview) for monitoring SQL running in Azure. See the SQL Insights (preview) documentation for details on the offering and versions of SQL we support. Each sample includes a template file and a parameters file with sample values to provide to the template.

Note

See Azure Resource Manager samples for Azure Monitor for a list of samples that are available and guidance on deploying them in your Azure subscription.

Create a SQL Insights (preview) monitoring profile

The following sample creates a SQL Insights monitoring profile. It includes the SQL monitoring data to collect, frequency of data collection, and specifies the workspace the data is sent to.

Template file

View the template file on GitHub.

Parameter file

View the parameter file on GitHub.

Add a monitoring VM to a SQL Insights monitoring profile

Once you create a monitoring profile, you need to allocate Azure virtual machines. These VMs will be configured to remotely collect data from the SQL resources you specify in the configuration for that VM. For more information, see Enable SQL Insights (preview).

The following sample configures a monitoring VM to collect the data from the specified SQL resources.

Template file

View the template file on GitHub.

Parameter file

View the parameter file on GitHub.

Create an alert rule for SQL Insights

The following sample creates an alert rule that covers the SQL resources within the scope of the specified monitoring profile. This alert rule appears in the SQL Insights UI in the alerts UI context panel.

The parameter file has values from one of the alert templates we provide in SQL Insights. You can modify it to alert on other data we collect for SQL. The template doesn't specify an action group for the alert rule.

Template file

View the template file on GitHub.

Parameter file

View the parameter file on GitHub.

Next steps