Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to realize single Partition Space alarm in Azure

Shulou Source: shulou.com Published: 2022-06-03 09:52:21 12月06日 Update

Hello, everyone, let's do a small experiment this time. We have talked about how to alarm disk space utilization in Azure, which is a very basic requirement for daily operation and maintenance. But one problem is that the indicators provided by Azure itself can only see the utilization of all disks, and some common scenarios cannot be covered.

For example, if we want to set a disk space alarm for a partition, such as disk D or disk E, then the metric in the VM provided by Azure itself will not be supported, because it can only alarm all disk space in the entire VM, but not a partition. If you want to see the metric provided by Azure, you can check it at the following URL

Https://docs.azure.cn/zh-cn/azure-monitor/platform/autoscale-common-metrics

Going back to the previous topic, it is not impossible to set alarms for individual disk partitions. Azure is actually quite flexible here. We can add the Metrics we want to monitor in the diagnostic settings, as long as this information is collected at the OS level.

Let's take a look at how to operate it.

First, we need to log in to OS, find the performance counter, add% Free Space in LogicalDisk, and here we can select the disk partition to view.

After that, you can actually see the disk space status of this partition, that is, Windows itself supports viewing the space utilization of individual disk partitions.

Double-click the counter, and in the properties of the performance counter, we can see that this entry represents the indicator of the space utilization of disk C.

An even easier way is that we can directly use PowerShell (Get-Counter-ListSet LogicalDisk). PathsWithInstances

You can see that we can actually monitor the status of many systems.

After that, in the performance counter of Azure VM, we select custom and enter the counter we have just looked up

After that, you can actually see the monitoring items you just added on the regular VM monitoring page!

After that, it is not easy to do something like calling the police. Similarly, if you want to see other indicators, you can use this method.

Tags: Disk space alarm utilization monitoring methods that is indicators counters performance support selection handy things that is representatives information can be passed scenarios Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Technology Linux Huawei Shulou Information