Monitor free disk space on Azure VM

让人想犯罪 __ 提交于 2020-01-01 08:34:26

问题


Is there some way how to monitor free disk space from the Azure Portal?

I know that there are all kinds of diagnostics for I/O, memory, network, CPU, .NET, SQL, ASP.NET, IIS, etc.

But is there some way to see how much free space there's on a disk attached to the VM?

All I found was this third-party solution:

http://cloudmonix.com/blog/how-to-monitor-free-disk-space-on-azure-vms/

But there should be some way how to see a basic metric like disk space without needing third-party SW, right?


回答1:


Update 2019

This is possible today. To monitor free disk space per drive with Azure Monitor do the following:

  1. Enable Guest Operating System OS Metrics for the VM.
  2. In the Azure Portal select the Virtual Machine.
  3. Click Diagnostics Settings (under Monitoring).
  4. Click the Performance counters tab.
  5. Click the Custom button.
  6. In the textbox add the custom metric for the drive you would like. e.g. \LogicalDisk(C:)\% Free Space.
  7. Click Add and set the Unit to Percent.

Source: Azure Support.




回答2:


For now, it is not possible on Azure Portal.

But you could do it by using Azure OMS. There is a example how to use Azure OMS to monitor free disk.




回答3:


This is not possible today through Azure Portal or Azure Monitor. Free disk space is a guest OS performance counter. If this is a Windows VM, you can use the Windows Azure Diagnostics (WAD) agent to collect performance counters to either Azure Storage table and/or EventHub and setup custom tool to monitor this data. If this is a Linux VM, there is also the equivalent Linux Diagnostic Extension.

Here are some relevant links on WAD -

https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-extensions-diagnostics-template?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/azure-diagnostics-streaming-event-hubs



来源:https://stackoverflow.com/questions/42853392/monitor-free-disk-space-on-azure-vm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!