How to find % disk used in Azure

anil kumar 1,641 Reputation points
2023-07-18T14:58:44.83+00:00

Hello there,

Greetings of the day!

We are looking for ways to identify how much % of disk capacity are in use ? If disk size is 256GB and it has only 128GB data in it, 50% of the disk size is in use for our calculations.

We are not looking for free size information at VM level, rather we want to gather that info for each disk.

Applicate your Response. Thank you!!

Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
603 questions
{count} votes

Accepted answer
  1. Tushar Kumar 3,311 Reputation points MVP
    2023-07-18T16:18:51.29+00:00

    Hi anil kumar

    You can enable VM insight through Azure portal or method of your choice

    https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-enable-portal

    Once done you can use following KQL Query to get the details

    InsightsMetrics
    | where Origin == "vm.azm.ms" 
      and Namespace == "LogicalDisk" 
      and Name == "FreeSpacePercentage"
    | extend Disk = tostring(todynamic(Tags)["vm.azm.ms/mountId"])
    | summarize Disk_Used_Space = 100 - avg(Val) by Computer, Disk, _ResourceId
    | project Computer, Disk, Disk_Used_Space
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vinodh247 13,801 Reputation points
    2023-07-18T15:53:45.24+00:00

    Hi,

    Thanks for reaching out to Microsoft Q&A.

    Did you try VM insights from azure monitoring? Pls check the below link and let me know if this is the one you are looking for...

    https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-performance

    Please Upvote and Accept as answer if the reply was helpful, this will be benefitting the other community members who go through the same issue.

    0 comments No comments