Documentation forServer & Application Monitor

Microsoft Azure App Service

Use this template to monitor requests sent to the Microsoft Azure App service, an HTTP-based service for hosting web applications, REST APIs, and mobile back ends.

For an overview of configuring Azure application monitor templates, watch SolarWinds Lab #82 (Part 2).

Tip: Consider using one of the new SAM API Poller templates designed for Azure instead of legacy application monitor templates.

This template was updated in March 2020 to fix an issue with the Average response time monitor. If you're using a version of SAM installed before SAM 2020.2, you can import the latest version from THWACK. Only AppInsight templates are updated during upgrades to avoid overwriting custom code. Alternatively, switch to the Microsoft Azure App Service API poller template

Prerequisites

  • An Azure account with sufficient permissions to monitor data.
  • Gather the following details for use in script arguments:
    • Subscription ID
    • Tenant ID
    • Application ID
    • Secret Key
    • Application Name
  • PowerShell module (Azure, AzureRM) and PowerShell 5.1 or later are installed on the target node.

    To install the Azure module, execute these PowerShell commands:

    • Install-Module -Name Azure
    • Install-Module -Name AzureRM
  • To connect with the Azure account, you'll need the SubscriptionID, ApplicationID, TenantID, and Secret Key.
    Any Azure App (with its name and ID) with minimum role of 'Read Only'.
  • The Application name for which metrics are being calculated, and its Resource Group name.

Credentials

  • Login credentials to access the Azure Portal, passed as script arguments per prerequisites (<SubscriptionID>, <TenantID>, <ApplicationID>, value=<Secret Key>, <Application Name>).
  • 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 (megabytes)

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 (megabytes)

Average memory used

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

Unit: MB (megabytes)

Average response time

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

Unit: MB (megabytes)

Troubleshooting

  • Verify that PowerShell version is 5.1 or later, and Azure module is installed on target system.
  • Scripts should run with administrator privileges.
  • Components connect to Azure using service principal authentication for which an 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.