Select Language:
If you’re trying to set up alerts for disk space on your Azure Virtual Machines, you might run into some challenges with getting detailed per-disk metrics. Here’s a straightforward guide to help you troubleshoot and configure your Data Collection Rules (DCR) to collect the disk metrics you need.
First, ensure that your Data Collection Rule (DCR) is properly configured to collect performance data for each disk. You want to track “% Free Space” for individual disks like C:, D:, etc., not just the total across all disks. Your current setup might be set to collect data only at the total level, which means you won’t see data for each disk separately.
Check your DCR and make sure you’re configuring the performance counter correctly. For each disk, you should include this performance counter: LogicalDisk(*)% Free Space. The asterisk * indicates all disks, but verify if your setup captures each individual disk instead of aggregating to a total.
Once your DCR is set up, associate it with your virtual machines and verify the data in Log Analytics. When you run queries on the Perf table, you should see entries for each disk instance like C:, D:, etc., under the InstanceName column. If you only see _Total, it means the agent isn’t collecting data for individual disks.
To fix this, consider these steps:
-
Verify monitored counters: Make sure your performance counter includes specific instances for each disk, not just the total. Use the exact syntax
LogicalDisk(C:)% Free Spacefor each disk if necessary. -
Review your agent configuration: Confirm that the Azure Monitor Agent is updated to the latest version, and check the agent logs for any errors related to counter collection.
-
Check documentation for limits: Understand that there may be some known limitations with collecting per-instance disk data via AMA. If the agent version supports it, the configuration should include the
*instance; if not, you might need specific custom configurations. -
Test with a different setup: Try creating a separate DCR that targets just one disk to see if the data appears correctly, then expand to other disks once confirmed.
Getting detailed, per-disk metrics is crucial for setting up precise alerts, like triggering when free space drops below 10%. Follow the above steps, and if the data still isn’t showing correctly, reach out with details of your current setup so you can get tailored support.
Let me know if you need more help or further clarification.





