Azure Monitoring - Azure Metrics

In the first part of this series, we introduced the confusion and complexity that tends to occur when looking at the long list of monitoring tools available for Azure.

We then provided a list of currently available tools that we will explore further.

We’ve already discussed Azure Activity Logs, Application Insights, Azure Advisor,  Azure Alerts, and Azure Diagnostics. The next tool on the list is Azure Metrics. 

Azure Metrics

Azure Metrics is similar to the Azure Diagnostics, in that it’s everywhere. Most Azure resources (i.e. Networks, Virtual Machines, Gateways, Web Apps, Databases, etc.) produce some level of metrics (like performance metrics for example). And with this data, we can track issues/changes, automatically react to these changes, and even perform an analysis.

For example, if you had a Virtual Machine, or even a Platform-as-a-Service (PaaS) Web App, you could track/record the performance metrics (i.e. CPU, Memory, Disk, Network), and when a certain metrics reach a threshold you define (i.e. CPU >80% for the last 10 minutes), you can automatically scale-up (i.e. add more CPU and Memory), or scale-out (add more instances) to react to that need. Also, the same works in reverse to scale-down/in.

Here’s a useful diagram that shows how you can interact and integrate with metrics collected against your Azure resources. Note that this is metrics against your Azure resources, and not the underlying or supporting Azure infrastructure.

If you’re curious about which Azure services support which metrics, here is a great article that lists all the supported metrics per resource type: https://learn.microsoft.com/en-us/azure/azure-monitor//data-platform

Here’s also an Overview of metrics in Microsoft Azure.

Real Word Example

It’s quite obvious how we would use metrics in the real world since that’s our primary method of identifying issues, troubleshooting, trend analysis, etc.

But let’s look at this through the Azure portal. We’re going to use this blog as our example.

If I navigate to my Web App (as this blog is hosted in a PaaS Web App, and not running on an IaaS VM that I manage), I see in the Overview page some standard views of key metrics like: HTTP 5xx errors, Data In/Out, Number of Requests, and Average Response Time.

But if I wanted to correlate similar but separate metrics, I can navigate to Azure Monitor > Metrics and select what I want to see; like in this example showing all the different HTTP 4xx responses.

You may also notice in Azure Monitor, there are 2 Metrics options, one of which is labeled “Preview”. This will be the new experience for using and viewing metrics.

However, when I attempted to view the same metrics that I selected under the current Metrics view, my Web App didn’t appear in the list, or the integration isn’t complete as no data was shown. Remeber, it is in “Preview” so it’s a work in progress.

But with the new v2 of Azure Metrics, you have a lot more power to correlate, pivot, group, etc. your data. For example, looking at my Application Insights data, I can view the number of Page Views grouped by Country.

And once you’re done creating the views that are important to you, can you pin them to your dashboard for easy viewing and access.

Conclusion

Azure Metrics are just sort of there. But with it, you can glean some powerful data insights, especially when you’re investigating an issue or troubleshooting. Certain data points are “on” by default, but in some cases, you may need to opt-in to collecting additional data (where applicable), but this is specific to the type of resource.

For example, with Azure Virtual Machines, Basic performance counters that are collected include the standard: CPU, Memory, Disk, and Network. But you could customize that to include ASP.NET and SQL performance data as well.

The next tool in our series will be Azure Monitor.

By Admin

Leave a Reply

Your email address will not be published. Required fields are marked *