An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hello Selvam Sekar
Thank you for reaching out. Understanding your existing monitoring setup before onboarding new alerts or dashboards is absolutely the right approach to avoid duplication.
Here's how you can centrally discover what's already configured for your Azure App Services (Web Apps and Workers/App Service Plans):
1. List All Existing Alert Rules for App Services
The most efficient way to query alert rules across multiple subscriptions is Azure Resource Graph Explorer (available directly in the Azure portal). Run this KQL query:
resources
| where type == "microsoft.insights/metricalerts"
| mv-expand scope = properties.scopes
| where tolower(tostring(scope)) contains "microsoft.web/sites"
or tolower(tostring(scope)) contains "microsoft.web/serverfarms"
| mv-expand criteria = properties.criteria.allOf
| project alertName = name,
resourceGroup,
subscriptionId,
severity = tostring(properties.severity),
enabled = tostring(properties.enabled),
metricName = tostring(criteria.metricName),
operator = tostring(criteria.operator),
threshold = tostring(criteria.threshold),
targetResource = tostring(scope)
This returns all metric-based alert rules targeting your Web Apps (microsoft.web/sites) and App Service Plans / Workers (microsoft.web/serverfarms), along with the specific metrics being monitored, thresholds, and severity.
You can also view recently fired alerts using:
alertsmanagementresources
| where properties.essentials.startDateTime > ago(12h)
| where tostring(properties.essentials.targetResourceType) in~ ("microsoft.web/sites", "microsoft.web/serverfarms")
| project name, severity = tostring(properties.essentials.severity),
alertState = tostring(properties.essentials.alertState),
targetResource = tostring(properties.essentials.targetResource),
startDateTime = todatetime(properties.essentials.startDateTime)
Official doc: Azure Resource Graph sample queries for Azure Monitor
Using Azure CLI:
az monitor metrics alert list --resource-group <resource-group-name> --output table
Official doc: az monitor metrics alert
Using REST API:
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts?api-version=2018-03-01
Filter the response where properties.scopes contains your App Service resource IDs.
2. Check Diagnostic Settings
Azure CLI:
# For a specific Web App
az monitor diagnostic-settings list \
--resource "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{app-name}"
# For an App Service Plan (Worker)
az monitor diagnostic-settings list \
--resource "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.Web/serverfarms/{plan-name}"
Official doc: az monitor diagnostic-settings
REST API:
GET https://management.azure.com/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings?api-version=2021-05-01-preview
Official doc: Diagnostic settings in Azure Monitor
3. Check Application Insights Configuration
To verify whether Application Insights is already linked to a Web App:
Azure CLI:
az webapp config appsettings list \
--name <app-name> \
--resource-group <rg-name> \
--query "[?name=='APPINSIGHTS_INSTRUMENTATIONKEY' || name=='APPLICATIONINSIGHTS_CONNECTION_STRING']"
If these app settings exist and have values, Application Insights is configured for that Web App.
You can also list all Application Insights resources across your subscriptions using Resource Graph:
resources
| where type == "microsoft.insights/components"
| project name, resourceGroup, subscriptionId,
instrumentationKey = tostring(properties.InstrumentationKey),
retentionDays = tostring(properties.RetentionInDays)
Official doc: Enable Application Insights for Azure App Service
4. Best Practice: Audit Monitoring Coverage Across Subscriptions
Azure Monitor – Monitoring Coverage (Preview): Azure Monitor now includes a centralized Monitoring Coverage experience to identify gaps in your observability posture. Navigate to Azure Monitor → Settings → Monitoring Coverage (Preview) in the portal. It highlights which resources have basic vs. enhanced monitoring enabled and lets you apply recommendations at scale.
Official doc: Monitoring coverage in Azure Monitor (preview)
Azure Policy for Governance at Scale: Use built-in Azure Policies (e.g., "Deploy diagnostic settings for App Service to Log Analytics workspace") to enforce monitoring configurations automatically. You can assign these as initiatives across management groups or subscriptions, and create remediation tasks to apply them to existing resources.
Official doc: Create diagnostic settings at scale using built-in Azure policies
Hope this helps! If you have any follow-up questions, feel free to ask.
Thanks,
Suchitra.