Microsoft Azure Administrator:Exam Guide AZ-103
上QQ阅读APP看书,第一时间看更新

Creating a metric

To display the metrics for the various Azure resources in Azure Monitor, perform the following steps: 

  1. Navigate to the Azure portal by opening https://portal.azure.com.
  1. In the left-hand menu, select Monitoring to open the Azure Monitor overview blade:
Azure Monitor overview
  1. First, we're going to look at metrics. Therefore, in the left-hand menu, select Metrics, or select the Explore Metrics button from the overview blade.
  1. In the Metrics overview blade, click on the + Select a resource button. A new blade will open up where you can select the subscription, the resource group, and the resource type. Select the subscription that was used for the demonstration of the previous chapter, select PacktResourceGroup, and then select the VM (in my case, Linux). You can filter by other resource types, as well:
Selecting the resources
  1. Click on Apply.
  1. Then, you can select the metric type. Select CPU Credits Consumedfor instance:
Metric type

Take some time to look at the different metrics that you can choose from. This may be a part of the exam questions.
  1. You can select a different type of aggregation as well, like the count, average, and more, in the filter box. In the top-right of the blade, you can select a different time range for your metric as well:
Time ranges
  1. You can also pin this metric to the overview dashboard in the Azure portal. Therefore, click on the Pin to dashboard button, and then choose to pin it to the current dashboard or create a new dashboard for it. For now, select Pin to current dashboard:
Pin metric to dashboard
  1. If you now select Dashboard from the left-hand menu, you'll see that this metric is added to it. This way, you can easily analyze this metric without the need to open Azure Monitor.
Metrics are also available directly from the Azure resource blades. So, for instance, if you have a VM, go to the VM resource by selecting it. Then, in the left-hand menu, under  Monitoring, you can select  Metrics.

In the next section, we're going to look at how to set up and analyze alerts in Azure Monitor.