I am trying to run a query in Azure to show the free disk space or used disk space of each VM in Azure under a specific subscription and I wanted to show in the result the actual disk size of the VM. I need the data to identify the over-allocated resource and to downscale it to minimize the cost. Can someone help me to modify the query inorder to show the actual disk size of the VM in another column aside from the free disk space? or is there other ways to get the data of the disks that I need?
Here is the query that I run from Azure under Monitor>Logs>Query
InsightsMetrics
| where Origin == "vm.azm.ms"
and Namespace == "LogicalDisk" and Name == "FreeSpacePercentage"
| extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"])
| summarize Disk_Free_Space = avg(Val) by Computer, Disk, _ResourceId
| project Computer, Disk, Disk_Free_Space
and only shows 3 columns Computer Name, Disk, Disk_Free_Space