Automatic alerts for low disk space?

Learner 20 Reputation points
2024-03-27T16:25:40.49+00:00

Is there a way to setup email alerts or any notifications, for devices that get below a certain disk space threshold?

Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,729 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,365 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZhoumingDuan-MSFT 8,065 Reputation points Microsoft Vendor
    2024-03-28T03:15:40.02+00:00

    @Learner, Thanks for posting in Q&A.

    Based on your issue description, you would like to monitor the free disk space of your device and receive an alert when is less than specific value.

    In this case you need to have: One Log Analytics Workspace to collect performance counters from your devices. Connect the server to the Log Analytics Workspace. Configured the Log Analytics workspace to collect performance counters from your devices.

    Please find below steps in detail:

    Follow this document to create a log analytics workspace.

    Then you need to go to your log analytics workspace and configure it to collect performance counters as per this document.

    Note: If you only need to monitor the % free in the disk I would like to suggest you only enable "% Free space".

    User's image

    Once you have configured your Log Analytics workspace to collect performance counters, you only need to connect your devices to your Log Analytics Workspace. Under Virtual machines, select the workspace you would like to monitor and click on it.

    267289-image.png

    You are going to see this screen in which you only need to click on "Connect" this step is going to install the OMS agent in your devices to collect the data from the devices into the Log Analytics Workspace. You can find more information about this agent in this documentation.

    267343-image.png

    Now that you already have the devices connected to your Log Analytics Workspace and collecting performance counters. You only need to use below query to configure the alert.

    Perf

    | where ObjectName == "Logical Disk" and CounterName == "% Free Space"

    | extend Free_Space_Percent = CounterValue

    | summarize by Computer, InstanceName, Free_Space_Percent

    //This section is meant to return logs that reflect when the % Free Space is less than a user-defined threshold

    | where Free_Space_Percent < 20

    //where is set the condition, you would like to monitor in this case when the value is less 20 it means its less than 20% free.

    Go to the option "Logs" paste the query and run it, once you run the query you are going to see enable the button "+ New alert rule", to create the alert.

    Create the alert following this documentation.

    In the tab "Actions" there you can follow the document to create an action group to send emails, you can follow this documentation to create and configure the action group.

    Hope it will help.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.