Microsoft Azure Cloud Role is a platform comprised of Web and Worker Roles that allows running scalable websites and background applications in Azure.



This step-by-step guide explains how to setup and monitor Azure Cloud Role using CloudMonix.



In this article


1. Monitoring setup

2. Collect, understand and use your data

    2.1 Metrics

    2.2 Alerts

    2.3 Actions

3. Setup verification and troubleshooting



Did you know?

CloudMonix extends native Azure Cloud Role monitoring with advanced metrics and features. Noteworthy:

  • CloudMonix receives data from the Azure Management API, Azure Monitor API and CloudMonix agent (if monitored via the agent)
  • ability to auto-scale and staggered reboot of every instance on a daily basis
  • pre-configured metrics (Web Role): application event logs, ASP.Net application restarts, ASP.Net bytes out, ASP.Net errors, ASP.Net requests, ASP.Net requests queued, ASP.Net requests rejected, ASP.Net request wait time, CPU time, CPU time 30 min average, disk free, disk idle time, disk read / write speed, instance list, memory committed, memory free, resource status, system event logs, system uptime
  • pre-configured metrics (Worker Role): application event logs, CPU time, CPU time 30 min average, disk free, disk idle time, disk read / write speed, instance list, memory committed, memory free, resource status, system event logs, system uptime
  • alerts on high CPU, instance rebooted, low memory, requests queuing up, resource outages, no ReadyRole instances, Non-Ready instances, slow disk
  • ability to reboot / reimage Azure Cloud Role instance, restart a service via PowerShell and run a custom PowerShell script on an instance based on conditions or schedule




Setup


a. Run the Setup Wizard in the portal (preferred way):


CloudMonix setup wizard

This article explains how to add resources to CloudMonix via the Setup Wizard.




b.  Download and install CloudMonix Agent (optional):


CloudMonix will use Azure Diagnostics Extension to monitor Azure Cloud Services by default. In case CloudMonix agent is preferred, it is important to understand the differences.

Noteworthy:

  • setup script for the agent can be run remotely
  • agent is pre-configured for specific account it was downloaded from
  • agent needs to be deployed for every monitored VM


Installation and configuration instructions for CloudMonix agent can be found here.




c. Tweak settings in the Definition tab (optional):


Definition tab for an existing resource can be accessed by clicking the resource's monitoring settings in the performance dashboard:


Resource monitoring settings



Definition tab provides optional settings for the resource name, Azure resource management certificate, cloud service, Cloud Role, option to use CloudMonix agent, diagnostics storage account (if Azure Diagnostics is used), option to keep Azure diagnostics configuration,  scale-up / scale-down cooling periods, configuration template and categories:



Definition settings



Best Practices

Configuration Template setting provides pre-defined configuration templates available in CloudMonix by default as well as previously stored custom templates. See predefined template for Azure Web Role and predefined template for Azure Worker Role for reference.




d. Manual setup (optional instead of the Setup Wizard route):



Click the Add New button in the top right corner of your dashboard:


Add new resource


Fill in required information in the Definition tab as described in the previous step.




e. Advanced configuration:


Advanced configuration


Advanced configuration tab provides additional monitoring settings, which are already set as default for most use-cases.




f. Scale Ranges and Scale Adjustments:


Auto-scaling and scale adjustments provide powerful reactive, proactive and scheduled auto-scaling rules. These settings can be accessed via the Scale Ranges and Scale Adjustments tabs:


Scale ranges & scale adjustments



Read the full article on how to use auto-scaling and scale adjustments features in CloudMonix.





Collect, understand and use your data


Specific Metrics, Templates, Alerts and Automation Actions for Azure Cloud Role:


Azure Cloud Role Settings




a. Metrics:


Diagnostic data points retrieved from the monitored resource are referred to as metrics . CloudMonix provides default templates for the metrics recommended for common configurations. Metrics can be further added, removed or customized in the Metrics tab of the Azure Cloud Role resource configuration dialog:


CloudMonix Azure Cloud Role monitoring metrics




b. Alerts:


CloudMonix features a sophisticated alert engine that allows alerts to be published for very particular conditions pre-defined by a template configuration or custom based on any of the available metrics. Alerts can be further added, removed or customized in the Alerts tab of the Azure Cloud Role resource configuration dialog:


CloudMonix alerts for Azure Cloud Role




c. Actions:


Actions are automation features that can be configured to fire based on specific conditions or schedule. Actions can be added and configured in the Actions tab of the Azure Cloud Role resource configuration dialog:


  • default monitoring templates for Cloud Role include the ability to reboot Cloud Role resource instance daily and reboot low-RAM Cloud Role. These actions are disabled by default and need to be explicitly enabled
  • available actions include the ability to reboot / reimage Azure Cloud Role instance, restart a service via PowerShell and run a custom PowerShell script on an instance based on conditions or schedule
  • when defining new actions, ensure that they are evaluated on an instance level, as this is the most common scenario
  • since Cloud Role instance can be rebooted by both Azure and CloudMonix automation rules, it is important to ensure these instances properly handle reboots via RoleEnvironment.Stopping event. Learn more here
  • proper handling of the TypologyChangeEvent generated by auto-scaling will ensure no unnecessary instance reboots will take place. Learn more here



CloudMonix Azure Cloud Role automation






Setup verification and troubleshooting


a. Setup verification:


Successful resource setup can be verified by clicking Test button in the resource configuration dialog and visiting the Test Results tab:


Monitoring setup test results



b. Troubleshooting monitoring issues:


CloudMonix provides deep insights into resource monitoring issues via the Status Dashboard screen. The screen allows to overview resources that have raised alerts and troubleshoot them by diving into the monitoring logs.


Status dashboard


Read the full article on how to use Status Dashboard to diagnose resource monitoring issues.