Export data using Diagnostic Settings

This article walks through the many available options to enable Diagnostic Settings on Classic Application Insights resources.

Note

Diagnostic Settings on classic Application Insights is only available if you have previously configured Continuous Export on the Classic Application Insights resource. If you want to configure Diagnostic Settings for exports without an existing Continuous Export, you must migrate to Workspace Application Insights first.

Warning

Beginning 29 April 2024 and ending 1 May 2024, continuous export will undergo maintenance in preparation for shut down. During this time, Continuous Export will be unavailable. Any data which would have been exported during this time will be exported at the conclusion of the maintenance window on 1 May 2024. Depending on the amount of data you are exporting, it may take up to 72 hours to fully recover.

Diagnostic Settings allows you to configure a data export to run side-by-side with your existing continuous export configuration. These settings also carry over to workspace-based Application Insights resources after you migrate.

Important

Enable Diagnostic Settings using Azure Portal

Note

Diagnostic Settings in Azure Portal will only be available if you have previously configured Continuous Export on the Classic Application Insights resource. If you want to configure Diagnostic Settings for exports without an existing Continuous Export, you must migrate to Workspace Application Insights first.

  1. Within your Classic Application Insights resource, navigate to the properties option.
  2. Under the Enable Diagnostics Settings Side-by-Side with Continuous Export heading*,* select Enable Diagnostic Settings
  3. From the pop-up, select Apply.
  4. Once you have received the final confirmation pop-up, the Diagnostic Settings option is enabled within your resource, and you can configure your export to run side by side with your current Continuous Export setting.

Enable Diagnostic Settings using an ARM Template

Prepare an ARM template to enable Diagnostic Settings on the classic AI resource and deploy the ARM template to the desired resource group.

{
    "$schema": https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#,
    "contentVersion": "1.0.0.0",
    "variables": {},
    "resources": [
        {
            "type": "microsoft.insights/components",
            "apiVersion": "2020-02-02",
            "name": "<resource-name>",
            "location": "<resource-location>",
            "properties": {
                "IngestionMode": "ApplicationInsightsWithDiagnosticSettings"
            }
        }
    ]
}

ARM templates can be deployed through the Azure portal, Azure CLI, and Azure PowerShell.

The following links document some of the popular ways to accomplish this task.

Enable Diagnostic Settings using Azure CLI

Diagnostic Settings can be enabled using the following Azure CLI script.

az account set --subscription "<subscription-id>"
az deployment group create --name EnableDiagnosticSettings --resource-group <resource-group-name> --template-file <path-to-template>

Confirm Diagnostic Settings is enabled

When disabled, Diagnostic Settings doesn't appear under Monitoring.

After following the prior instructions in this article and refreshing the Application Insights resource page, Diagnostic Settings can be configured by clicking on Diagnostic Settings under Monitoring.