Remediation
From Azure Portal
- Navigate to
Application Insights. - Under the
Basicstab within thePROJECT DETAILSsection, select theSubscription. - Select the
Resource group. - Within the
INSTANCE DETAILS, enter aName. - Select a
Region. - Next to
Resource Mode, selectWorkspace-based. - Within the
WORKSPACE DETAILS, select theSubscriptionfor the log analytics workspace. - Select the appropriate
Log Analytics Workspace. - Click
Next:Tags >. - Enter the appropriate
TagsasName,Valuepairs. - Click
Next:Review+Create. - Click
Create.
From Azure CLI
az monitor app-insights component create --app <app name> --resource-group <resource group name> --location <location> --kind "web" --retention-time <INT days to retain logs> --workspace <log analytics workspace ID> --subscription <subscription ID>
From PowerShell
New-AzApplicationInsights -Kind "web" -ResourceGroupName <resource group name> -Name <app insights name> -location <location> -RetentionInDays <INT days to retain logs> -SubscriptionID <subscription ID> -WorkspaceResourceId <log analytics workspace ID>