HI,

i want to check the free space of hard disk, if free space is less than 50% of totalspace avilable, then it sends a mail or message to the mobile. this is used for continuous monitoring of free space. by the using of COMMAND PROMPT, BATCH FILE, or VBS script.

wmic logicaldisk where name='G:' name=get size,freespace,caption

above statement gives the freespace of particular disk. the main problem is that how to take the the freespace on a new variable, to perform the analysis on that data.


Article Comments

What you could do for this would be to query WMI for the PercentFreeSpace for that drive then use that query in a Custom WMI Sensor. Once you have that sensor created, you can create custom limits for that channel to alert when that percentage falls below 50%.

The WQL Query would look like this

SELECT PercentFreeSpace FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk WHERE Name='G:'

You would create a wql file with this in it, then put that in the Custom Sensors directory under \PRTG Network Monitor\Custom Sensors\WMI WQL scripts

Then create your sensor with that query that was built on the device you want to monitor. This will return the percentage of free space on the disk and then you can edit the channel settings to have limits on that number so that when it's below a certain amount it can go into a warning or error state. Channel Settings


May, 2013 - Permalink

PRTG has a standard sensor for this.

From the manual:

The WMI Free Disk Space (Multi Drive) sensor monitors the free disk space of one or multiple drive(s) using Windows Management Instrumentation (WMI). It shows the space in percent and total. One single sensor is used for all drives; the data is presented in different channels.


May, 2013 - Permalink