Share via

Is Azure App Service Worker Instance CPU Percentage Metric Available in Logs?

Selvam Sekar 100 Reputation points
2026-05-05T10:42:15.3866667+00:00

Is the Azure App Service worker instance CPU Percentage metric available in any logs (such as Azure Monitor Logs / Log Analytics), in addition to being visible in the Azure Portal UI?

If yes, could you please confirm:

  • The log table name (e.g., AppServiceMetrics, AzureMetrics, etc.)
  • The metric name / field that represents CPU usage
  • Whether it is available per worker instance or only at the App Service Plan level

I’ve attached the Azure Portal UI screenshot for reference.

User's image

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


Answer accepted by question author

Golla Venkata Pavani 5,745 Reputation points Microsoft External Staff Moderator
2026-05-05T11:34:01.3233333+00:00

Hi @Selvam Sekar ,

Thank you for reaching us regarding the issue.

Yes, the Azure App Service CPU Percentage metric is available in Azure Monitor Logs / Log Analytics (in the AzureMetrics table), provided you configure diagnostic settings to export it.

Supported Metrics for App Service Plans (Microsoft.Web/serverfarms):

  • Metric Display Name: CPU Percentage
  • Name in REST API: CpuPercentage
  • Unit: Percent
  • Aggregation: Average (primarily)
  • Dimensions: Instance
  • DS Export: Yes (exportable to Azure Monitor Logs via Diagnostic Settings)
  • Description: “The average CPU used across all instances of the plan.”

Note on Web Apps (Microsoft.Web/sites): CpuPercentage is available only for Flex Consumption Function Apps. For standard Web Apps, the equivalent per-instance metric is CPU Time (CpuTime), which is also exportable to logs.

Log Table

  • Table Name: AzureMetrics (platform metrics exported via Diagnostic Settings land here).
      AzureMetrics
      | where ResourceProvider == "MICROSOFT.WEB"
        and MetricName == "CpuPercentage"
        and TimeGenerated > ago(1d)
      | summarize AvgCPU = avg(Average) by bin(TimeGenerated, 5m), Resource, Instance
      | render timechart
      
    
  • Per Worker Instance: Yes , via the Instance dimension (exactly as shown when you apply splitting in the Azure Portal Metrics UI).
  • App Service Plan Level: Yes , aggregated across all instances.

How to Enable

  • Go to your App Service Plan (or App Service) > Diagnostic settings > + Add diagnostic setting.
  • Select AllMetrics (or specific metrics) > Route to your Log Analytics workspace.
  • Save. Data typically appears within a few minutes.

This is the same data source used by the Portal Metrics UI when diagnostics are enabled. Your screenshot shows CPU Time (CpuTime), which follows the same pattern and is also in AzureMetrics.

Reference:
https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-web-serverfarms-metrics
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/create-diagnostic-settings
https://learn.microsoft.com/en-us/azure/app-service/monitor-app-service

Kindly let us know if the above helps or you need further assistance on this issue.

Please "accept" if the information helped you. This will help us and others in the community as well.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-05-05T10:42:30.0033333+00:00

    Yes. App Service platform metrics, including CPU-related metrics, can be routed into Azure Monitor Logs / Log Analytics.

    From the monitoring reference:

    • App Service metrics are exposed under the Microsoft.Web/sites and Microsoft.Web/serverfarms metric namespaces.
    • Platform metrics can be sent to Azure Monitor Logs via a diagnostic setting, where they land in the AzureMetrics table.

    Concretely for the worker CPU metric:

    1. Log table name
      • When a diagnostic setting is configured to send metrics to Logs, App Service metrics are stored in the AzureMetrics table.
    2. Metric name / field for CPU usage
      • CPU-related metrics for App Service are part of the Microsoft.Web metrics set. The full list (including CPU Percentage and CPU Time) is documented under the supported metrics for Microsoft.Web/sites and Microsoft.Web/serverfarms in the monitoring data reference.
      • In the AzureMetrics table, the metric is identified by the MetricName column; CPU metrics appear there with their documented metric names (for example, CPU Time or CPU Percentage as listed in the Microsoft.Web/sites metrics reference). The actual numeric value is stored in the standard value columns of AzureMetrics (such as Average, Minimum, Maximum, etc., depending on the aggregation chosen when the metric was emitted).
    3. Per worker instance vs. plan level
      • App Service metrics support dimensions. For Microsoft.Web/sites and Microsoft.Web/serverFarms, the documented metric dimension is Instance.
      • When metrics are sent to Logs, this dimension is preserved in the AzureMetrics table, so CPU metrics can be queried per worker instance by filtering or grouping on the Instance dimension, or aggregated at the App Service Plan level by omitting that dimension.

    To summarize: the worker CPU metric visible in the Metrics blade can be exported to Azure Monitor Logs via diagnostic settings, where it appears in the AzureMetrics table, identified by its MetricName and with an Instance dimension that allows per-worker-instance analysis as well as plan-level aggregation.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.