Thanks for posting your question in the Microsoft Q&A forum.
To set up Azure alerts:
Go to your Log Analytics workspace and navigate to Agents
> Data Collection Rules
and create a new rule or modify an existing one. Then add a Performance Counter data source and under Custom
, add these counters:
\LogicalDisk(*)\Free Megabytes
\LogicalDisk(*)\% Free Space
Go to your VM in the Azure portal and navigate to Monitoring
> Alerts
then click New alert rule.
For the signal, choose Custom log search
and use this KQL query
Perf
| where ObjectName == "LogicalDisk"
| where CounterName == "% Free Space"
| where InstanceName in ("C:", "D:", "E:", "F:")
| summarize arg_max(TimeGenerated, *) by InstanceName
| where CounterValue <= 10
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful