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 {{retention-days}} \
--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 {{retention-days}} `
-SubscriptionID {{subscription-id}} `
-WorkspaceResourceId {{log-analytics-workspace-id}}