I want to create an alert the disk storage used for my VM. I couldn't able to select the appropriate condition. What signal should I select?

kan jag 20 Reputation points
2023-12-13T21:09:12.33+00:00

I want to monitor the disk storage space used in one of my VM and I am trying to create an alert. Please suggest what should be the condition for that particular criteria?

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

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 96,926 Reputation points MVP
    2023-12-13T21:35:27.5666667+00:00

    Hi @kan jag ,

    maybe this thread with answer is helpful to get your requirement done: help to set up azure alert for disk space alert when 10gb or less


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    0 comments No comments

  2. Anand Prakash Yadav 6,005 Reputation points Microsoft Vendor
    2023-12-14T12:49:08.99+00:00

    Hello kan jag,

    Thank you for posting your query here!

    Adding on to the previous comment, with Azure Monitor for Virtual Machines, you can either do it in KQL with a query in the text below, using Azure Monitor for Virtual Machines Guest Health

    InsightsMetrics
    | where Computer in (
    "DC10.na.contosohotels.com" // Windows
    )
    | where Namespace == "LogicalDisk"
    | where Name == "FreeSpacePercentage"
    | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"])
    | summarize arg_max(TimeGenerated, *) by Disk, Computer
    | project TimeGenerated, Disk, Computer, Val
    | where Val > 90     //To setup the alert when disk utilization has reached 90%                                           

    You can add more filters if needed and specify thresholds in Azure Monitor alerts rather than in KQL.

    Also, there is another way to do it in portal using below:

    1. Portal -> Virtual Machines
    2. Click on the "Disks" option in the left-hand menu.
    3. Select the disk you want to set the alert for.
    4. Click on the "Alerts" option and select New Alert.
    5. In the "Create rule" page, fill in the required info and under the "Condition" section, choose "Add metric condition and select the "Metric" you want to create an alert on. For example, select "Percentage used".
    6. Choose the appropriate "Aggregation type" and "Time window" for the metric.
    7. Set the "Threshold" type to "Static" and define a "Threshold value" of 90%.
    8. Click on the "Add action group" button to add an action group to the alert.
    9. Fill in the "Action group details"
    10. Configure an "Email/SMS/Push/Voice" action type.
    11. Click on the "Create alert rule" button to create the alert.

    For further reference:

    https://learn.microsoft.com/en-us/answers/questions/1332871/how-to-setup-azure-alert-when-disk-space-is-90-for

    https://techcommunity.microsoft.com/t5/azure-observability/i-want-see-an-alert-when-my-disk-space-less-than-5gb-in-virtual/m-p/2210373

    Kindly let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments