Microsoft Azure App Service

This template contains performance and statistics counters to monitor Azure App Services.

Prerequisites

  • PowerShell 5.1 or later is installed on the system where the template will run.
  • PowerShell module (Azure, AzureRM) is installed on the system where the template will run.

    To install the Azure module, execute these PowerShell commands:

    • Install-Module -Name Azure
    • Install-Module -Name AzureRM
  • To connect with the Azure account, the following parameters are required:
    • subscriptionID
    • ApplicationID
    • TenantID
    • Secret Key
    • Application Name: Any Azure App (with name and ID) with Contributor or Reader role in Azure role-based access control (RBAC).
  • The Application name for which metrics are being calculated.
  • Time interval for which data has to be fetched, in hours.

Credentials

  • Login credentials for the Azure Portal, passed as script arguments per prerequisites.
    For example, <SubscriptionID>, <TenantID>, <ApplicationID>, value=<Secret Key>, <Application Name>), TimeRange=<Time in hrs>.
  • Optional parameters can be passed to script argument:
    • value=<Time Interval> - during which data must be fetched, in minutes. The default is 10 minutes.
    • Number of retries as the second last argument; the default is 3.
    • WaitTime as the last argument; the default is 0.5 seconds

Notes

See also Troubleshooting.

Component Monitors

Average number of bytes sent

This monitor provides the average number of bytes sent for the given app.

Unit: MB

Total number of 2xx requests

This monitor provides the count of requests resulting in an HTTP status code >= 200 but < 300 for the given app.

Unit: Count

Total number of 3xx requests

This monitor provides the count of requests resulting in an HTTP status code >= 300 but < 400 for the given app.

Unit: Count

Total number of 401 requests

This monitor provides the count of requests resulting in HTTP 401 status code for the given app.

Unit: Count

Total number of 403 requests

This monitor provides the count of requests resulting in HTTP 403 status code for the given app.

Unit: Count

Total number of 404 requests

This monitor provides the count of requests resulting in HTTP 404 status code for the given.

Unit: Count

Total number of 406 requests

This monitor provides the count of requests resulting in HTTP 406 status code for the given.

Unit: Count

Total number of 4xx requests

This monitor provides the count of requests resulting in an HTTP status code >= 400 but < 500 for the given app.

Unit: Count

Total number of 5xx requests

This monitor provides the count of requests resulting in an HTTP status code >= 500 but < 600 for the given app.

Unit: Count

Total number of requests served by the app

This monitor provides the total number of requests regardless of their resulting HTTP status code for the given app.

Unit: Count

Average number of bytes received

This monitor provides the average number of bytes received for the given app.

Unit: MB

Average memory used

This monitor provides the average amount of memory in MiBs used by the app.

Unit: MB

Average response time

This monitor provides the average time taken for the app to serve requests in ms.

Unit: MB

Troubleshooting

  • Verify that PowerShell (5.1 or later) and the Azure module are installed on the system where the template will run.
  • Scripts should run with administrator privilege.
  • Components connect to Azure using service principal authentication for which application was created in the Azure portal. See Provide applications access to Azure Stack.
  • Provide Azure IAM permission to the application. See Configure Azure IAM permissions for cloud monitoring in the Orion Platform.
  • Script fetch data is based on time range given in last script arguments. By default, scripts fetch data for the past 1 hour. While giving time range, make sure data is available for the metric at that time; otherwise, components cannot fetch data.