Monitoring Azure PaaS with SolarWinds Server

As some organizations start to either move workloads to the cloud, or as they build new apps and services natively within the cloud, the number of hybrid deployments and environments are increasing exponentially. In these hybrid environments, it’s important to remember how critical it can be to retain a single pane of glass, allowing for visibility into your applications and infrastructure.

With the recent release of Server & Application Monitor v6.7 (SAM), we’ve built in support for monitoring containers for Docker, Mesos, and Kubernetes, giving you visibility infrastructure wide into physical, virtual, cloud, and now container infrastructure.  Check out SAM’s product page to see all of SAMs features and supported systems and applications.  As cloud services and cloud infrastructure continues to grow and see more adoption, Server & Application Monitor needs to grow with it. In this post, we’ll discuss some of the ways we’re supporting this growth, as we highlight several new additions to support Microsoft Azure PaaS services. We’ll dive deeply into three of these new additions below. And of course, as always, please let us know any additional content you’d like to see SAM monitor.   To begin these template and others, SAM is can be download here.

The three new templates I am going to cover today for Azure include:

  • Azure App Service
  • Azure SQL Database
  • Azure Event Hub

For all three of these templates, be sure to install a couple of PowerShell modules on the system that SAM is installed, allowing you to leverage the following PowerShell commands:

  • Install-Module -Name Azure
  • Install-Module -Name AzureRM

Azure App Service:

Application Template can be downloaded here - Microsoft Azure App Service.apm-template

Prerequisites:

  1. To connect with your Azure account, the following parameters are required:

     subcriptionID,ApplicationID,TenantID, Secret Key, Application Name

     Note: Azure App to monitor, with its name and ID, should have role set as 'contributor or Reader' in the Azure access control.

    2. Application name for which metrics will be calculated.

    3. Time interval for which data has to be fetched (in hours).

    4. PowerShell version supported 5.1 or above.

Script Argument:

  • Login credential to access Azure Portal. Azure details have to be passed in script arguments as per prerequisite #2.

Example:

             <SubscriptionID>,<TenantID>,<ApplicationID>,secretKey=<Enter SecretKey>,<ApplicationName>,TimeRange=<Time in hrs>

  • The ApplicationID with which you are making a connection to the Azure portal (as mentioned in Credential/Prerequisites) must be registered in Azure Active Directory as a contributor role for the monitored application.

        Reference link: https://support.solarwinds.com/Success_Center/Server_Application_Monitor_(SAM)/Knowledgebase_Articles/Add_an_Azure_Active_Directory_app_for_cloud_monitoring_in_the_Orion_Platform

Portions of this document were originally created by and are excerpted from the following sources:

https://docs.microsoft.com/en-us/azure/app-service/web-sites-monitor   

https://docs.microsoft.com/en-us/powershell/azure/authenticate-azureps?view=azurermps-6.7.0

https://docs.microsoft.com/en-us/powershell/module/azurerm.insights/?view=azurermps-6.7.0&viewFallbackFrom=azurermps6.7.0#monitor

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 app.

      Unit: Count

  • Total number of 406 requests

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

      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 MBs used by the given app.

      Unit: MB (Mega Bytes)

  • Average response time

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

      Unit: MS (Milliseconds)

TROUBLESHOOTING STEPS

Detailed troubleshooting steps (common for template):

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

Be sure to detail troubleshooting steps (specific for components).

  • Components connect with Azure using service principal authentication for which application has to be created at the 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 was created in the last step. 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 the past hour. While giving the time range, make sure the data is available for the metric at that time, otherwise the component will be unable to fetch the data.

Azure App Service 1.png

Azure App Service 2.png

Azure SQL Database:

Application Template can be downloaded here: Microsoft Azure SQL Database.apm-template

Prerequisites:

  1. To connect with your Azure account, the following parameter is required: subcriptionID, ApplicationID, TenantID, Secret Key.

Note: Any Azure App (with its name and ID) having role as 'Read Only'.

    2. SQL Server Database name for which metrics have to be calculated.

    3. Time interval for which data has to be fetched (in hours).

    4. PowerShell version 5.0 or later.

Credentials:

  1. Login credential to access your Azure Portal. This has to be passed as script arguments per prerequisite #2, as listed above. e.g. <subcriptionID>, <TenantID>, <ApplicationID>, value=<Secret Key>, <Application Name>, value=<Time Interval>, <Database Name>
  2. Windows Administrator on the machine where template would be running against.    

Portions of this document were originally created by and are excerpted from the following sources:

https://azure.microsoft.com/en-in/blog/windows-azure-sql-database-management-with-powershell/

https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-supported-metrics

MONITORED COMPONENTS

  • Blocked Connections

      This metric provides the average number of firewall blocked connections established for the given SQL database during the time period specified as the polling frequency.

      Unit: Count

  • Failed Connections

      This monitor provides the average number of failed connections established for the given SQL database during the time period specified as the polling frequency.

      Unit: Count

  • Successful Connections

      This metric provides the average number of successful connections established for the given SQL database during the time period specified as the polling frequency.

      Unit: Count

  • Deadlocks

      This metric provides the average number of deadlocks established for the given SQL database during the time period specified as the polling frequency.

      Unit: Count

  • Database throughput units (DTU) limit

      This metric provides the average database throughput limit in units for the given SQL database during the time period specified as the polling frequency.

      Unit: Count

  • Database throughput units (DTU) used

      This metric provides the average database throughput units used for the given SQL database during the time period specified as the polling frequency.

      Unit: Count

  • Sessions percentage

      This metric provides the average percentage of available sessions used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • Database size percentage

      This metric provides the average percentage of storage used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • Total database size

      This metric provides the average for the total database size for the given SQL database during the time period specified as the polling frequency.

      Unit: Megabytes

  • Workers percentage

      This metric provides the average percentage of available workers used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • Average CPU utilization

      This metric provides the average percent CPU used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • Average IO utilization

      This metric provides the average percentage of data IO used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • Average log utilization

      This metric provides the average percentage of log IO used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • In-Memory OLTP storage percent

      This monitor provides the average In-Memory OLTP (Online Transaction Processing) storage percent for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

  • Database throughput unit (DTU) percentage

      This metric provides the average percentage of database throughput units used for the given SQL database during the time period specified as the polling frequency.

      Unit: Percent

Azure SQL Database 1.png

Azure SQL Database 2.png

Azure Event Hub:

Application Template can be downloaded from here: Microsoft Azure Event Hub Namespace.apm-template

Prerequisites:

  1. To connect with your Azure account, the following parameters are required: subcriptionID, ApplicationID, TenantID, Secret Key, Application Name

Note: Any Azure App (with its name and ID) having role as 'Read Only'.

  1. Namespace for which metrics have to be calculated.
  2. Time interval for which data has to be fetched (in hours).
  1. PowerShell version 5.0 or later.

Credentials:

  1. Login credential to access the Azure Portal. This has to be passed as script arguments per prerequisite #2, listed above. e.g. < subcriptionID>, < TenantID>, < ApplicationID>, value=<Secret Key>, <Application Name>, value=<Time Interval>, <Application Name>
  2. Windows Administrator on the machine where template would be running against.    

Portions of this document were originally created by and are excerpted from the following sources:

https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-quickstart-powershell

https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-supported-metrics

https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-metrics-azure-monitor


MONITORED COMPONENTS

  • Archive backlog messages

      This monitor provides total Archive messages in backlog for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Archive message throughput

      This monitor provides total Event Hub archived message throughput for the given namespace via PowerShell cmd-let.

      Unit: Bytes

  • Archive messages

      This monitor provides total Event Hub archived messages for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Incoming Bytes

      This monitor provides the total Event Hub incoming message throughput for the given namespace via PowerShell cmd-let.

      Unit: Bytes

  • Outgoing bytes

      This monitor provides the total Event Hub outgoing message throughput for the given namespace via PowerShell cmd-let.

      Unit: Bytes

  • Average Disk Seconds per Write

      Average Disk Seconds per Write is the average time of a write of data to the disk.

  • Incoming Messages

      This monitor provides the total incoming messages for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Incoming Requests

      This monitor provides the Total incoming send requests for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Internal Server Errors

      This monitor provides the Total internal server errors for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Other Errors

      This monitor provides the total failed requests for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Outgoing Messages

      This monitor provides the total outgoing messages for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Successful Requests

      This monitor provides the total successful requests for the given namespace via PowerShell cmd-let.

      Unit: Count

  • Server Busy Errors

      This monitor provides the Total server busy errors for the given namespace via PowerShell cmd-let.

      Unit: Count

Azure Event Hub 1.png

Azure Event Hub 2.png

The SolarWinds trademarks, service marks, and logos are the exclusive property of SolarWinds Worldwide, LLC or its affiliates. All other trademarks are the property of their respective owners.

  • I know this post is old but, Wondering if there is a new template to monitor PaaS in Azure. I'm getting this error using this template. Output: ==============================================
    [ERROR] Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient' from assembly 'Microsoft.Azure.Commands.ResourceManager.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
    Trying to reconnect..
    [ERROR] Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient' from assembly 'Microsoft.Azure.Commands.ResourceManager.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
    Trying to reconnect..
    [ERROR] Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient' from assembly 'Microsoft.Azure.Commands.ResourceManager.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
    Error while connecting

  • As cloud services and cloud infrastructure continues to grow and see more adoption, Server & Application Monitor Artificial Grass Gilbert AZ needs to grow with it. 

  • This monitor provides the total Event Hub outgoing message throughput for the given namespace via synthetic Grass PowerShell cmd-let.

  • Yes, I also got confused in this article.

    Do I need to install the Azure Az module to execute the powershell script or it is using the latest Microsoft Graph API?

  • This article does not provide proper guidance and lacks lots of steps, I can't make use of this document to deploy Azure PaaS monitoring. Can somebody share a proper documentation.

Thwack - Symbolize TM, R, and C