To set up an alert for low disk space on an Azure Virtual Machine, follow these steps:
Navigate to the Azure Portal: Log in to the Azure portal and select the virtual machine you want to monitor.
Go to Monitoring: In the VM's resource page, locate the Monitoring section.
Create Alert Rule:
Click on "Create alert rule."
Under the *Condition* tab, select "Metrics" as the signal type.
Choose a metric related to disk space, such as "% Free Space" or "Free Megabytes."
**Set Threshold**: Define the threshold value for triggering the alert (e.g., below 10% free space).
**Configure Actions**:
In the *Actions* tab, specify what should happen when the alert is triggered, such as sending notifications via email or SMS.
- Finalize and Create: Provide a name and description for your alert rule, then click "Create" to finalize it1
For more granular monitoring (e.g., per disk), you can use KQL (Kusto Query Language) queries in Log Analytics Workspace. Configure diagnostic settings on your VM to collect performance data and write a custom query targeting specific disks.
Citations: