Cloud Computing

Azure Monitor: Creating Metrics

In today’s Ask the Admin, I’ll show you how to set up metrics in Azure Monitor.

In Azure Monitor: Logs and Saving Queries on the Petri IT Knowledgebase, I showed you how to view and filter the results of the activity logs, save your queries, and view and enable diagnostic logging. But Azure Monitor has a couple of other features, called metrics and alerts, that allow us to configure performance thresholds and trigger alerts if they are exceeded.

Configuring metrics in Azure Monitor (Image Credit: Russell Smith)
Configuring metrics in Azure Monitor (Image Credit: Russell Smith)

Metrics collect information about resources you create in Azure, and about the Azure fabric. They can be used for tracking performance issues, used as the source information for alert notifications; and to initiate automated actions, such as autoscaling resources or starting an Azure runbook.

Sponsored Content

What is “Inside Microsoft Teams”?

“Inside Microsoft Teams” is a webcast series, now in Season 4 for IT pros hosted by Microsoft Product Manager, Stephen Rose. Stephen & his guests comprised of customers, partners, and real-world experts share best practices of planning, deploying, adopting, managing, and securing Teams. You can watch any episode at your convenience, find resources, blogs, reviews of accessories certified for Teams, bonus clips, and information regarding upcoming live broadcasts. Our next episode, “Polaris Inc., and Microsoft Teams- Reinventing how we work and play” will be airing on Oct. 28th from 10-11am PST.


Define Metrics in Azure Monitor

In the instructions below, I’ll show you how to set up a metric for virtual machine (VM) CPU usage. For VMs, Azure divides some metrics into two categories: guest-os-level and host-os-level. Host-os-level metrics show information about the Hyper-V host server, and guest-os-level metrics about the VMs you create in Azure. Before guest-os-level metrics can be collected for a VM, diagnostic logging must be enabled, which you can do by either completing the instructions in Azure Monitor: Logs and Saving Queries, or by modifying the diagnostic logging option in the VM’s settings panel.

The first task is to determine the resource type for which we want to create a metric:

  • Log in to the Azure portal here using an administrator account for the tenant.
  • Click the Monitor in the list of options in the left pane of the Azure portal. Monitor will appear in the list if you followed the instructions in the previous Azure Monitor article on Petri.
  • Under EXPLORE in the Monitor – Activity log panel, click Metrics.
  • Using the Subscription drop-down menu that appears to the right, select your Azure subscription.
  • In the Resource group menu, select a resource group from the list, or type in the box to filter the available list.
  • In the Resource type menu, you can either choose Select all, which is the default option or check one or more resources manually.
  • Finally, select the resource you want to create a metric for from the Resource menu.

A list of available metrics for the resource will now appear below the drop-down menus.

  • Choose one or more metrics under Available metrics. I have chosen CPU percentage guest OS. I get a warning stating that if I want to choose more metrics, they must be of the same unit (i.e., percentage).

In the Plot section of the Monitor – Metrics panel, you’ll see a graphical representation of your chosen metrics, which you can customize by changing the type of graph and polling frequency using the drop-down menus above the graph. It’s also possible to pin the metric to the portal dashboard by clicking Pin to the dashboard in the top right of the panel.

In this article, I showed you how to set up metrics in Azure Monitor. In a forthcoming article, I’ll show you how to set up alerts.

Related Topics:


Don't have a login but want to join the conversation? Sign up for a Petri Account

Comments (0)

Leave a Reply

IT consultant, Contributing Editor @PetriFeed, and trainer @Pluralsight. All about Microsoft, Office 365, Azure, and Windows Server.
External Sharing and Guest User Access in Microsoft 365 and Teams

This eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

You will learn:

  • Who should be allowed to be invited as a guest?
  • What type of guests should be able to access files in SharePoint and OneDrive?
  • How should guests be offboarded?
  • How should you determine who has access to sensitive information in your environment?

Sponsored by: