Microsoft Azure App Service [Deprecated]

Deprecation Notice

This template and all associated files have been deprecated.  Please use Microsoft Azure App Service - Application Monitor Templates - Server & Application Monitor


This SAM template contains performance and statistics counters for monitoring Azure App Services. 

Note: This template was updated on March 12, 2020, to fix an issue with the Average response time component monitor. Unexpected return codes caused nodes to switch to an Unknown status. If using SAM 6.9 or later, import this template into SAM via the Shared Templates on THWACK tab on the Manage Templates page, as described in Import and export SAM templates. Fresh installations of future SAM releases will include the updated template.

Prerequisites:

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 subcriptionID, 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.

Credentials

  • Login credential 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

MONITORED COMPONENTS

Average number of bytes sent

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

Unit: MB (Mega Bytes)

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 (Mega Bytes)

Average memory used

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

Unit: MB (Mega Bytes)

Average response time

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

Unit: MB (Mega Bytes)

TROUBLESHOOTING STEPS

Detail troubleshooting steps (common for template)

  • Check PowerShell version is 5.1 or more and azure module installed on system where template run.
  • Template uses PowerShell components; script should run with administrator privilege.

Detail troubleshooting steps (specific for components)

  • Components connect with azure using service principal authentication for which application has to be created at azure portal see below link:

https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-create-service-principals

  • Provide Azure IAM permission to the application which is created in above point see below link:

https://support.solarwinds.com/Success_Center/Server_Application_Monitor_(SAM)/Knowledgebase_Articles/Configure_Azure_IAM_permissions_for_cloud_monitoring_in_the_Orion_Platform

  • Script fetch data based on time range given in last script arguments. By default, script fetch data for past 1 hour. While giving time range make sure data is available for the metric at that time otherwise component will unable to fetch data.
  • Am I interpreting this documentation correctly that these credentials must be passed individually for each component monitor or can these be inherited? If I have 5 App Services I wanted to monitor, in theory, would I need 5 different App Monitor Templates, all with the component monitors custom-configured 13 times (once for each component monitor in the template)?

    Login credential to access the Azure Portal, passed as script arguments per prerequisites (<subscriptionID>, <TenantID>, <ApplicationID>, value=<Secret Key>, <Application Name>).