What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How can I monitor used disk space?

Votes:

0

How can I monitor used disk space? On windows and linux system

disk space used

Created on Mar 9, 2017 1:44:02 PM



Best Answer

Accepted Answer

Votes:

0

OK I wanted to provide a work around for this user and I did find one using Sensor Factory.

  1. set up the default disk free monitor (just producing the disk free)
  2. set up the size as suggested above
  3. set up a Sensor Factory (search for it in add sensors)

Default formula:

#<id>:<name>[<unit>]
<formula>

Formula in my case:

#99977:EDriveUsage
(( channel(4676,0) - channel(4672,8) ) /  1048576 )

How this breaks down, ID is just arbitrary but needs to be unique. Name is also Arbitrary Channel 4676 in my case is the id of the WMI query for disk size, inside that if you look at one of the graphs you can see the second value (the stream I believe), The next channel in my case was 4672, that was the value of the default disk space free WMI. The last pieces was dividing to bring it into MBytes vs Bytes.
Hopefully that helps some folks!

Created on Apr 20, 2018 6:31:17 PM

Last change on Apr 23, 2018 7:39:28 AM by  Dariusz Gorka [Paessler Support]



6 Replies

Votes:

0

Hi there,

To monitor the Disk Space on a Windows Server, use the following Sensors:
SNMP Disk Free Sensor
WMI Free Disk Space (Multi Drive) Sensor

to monitor the disk space for a Linux Server, use the following Sensors:
SNMP Linux Disk Free Sensor
SNMP Linux Physical Disk Sensor
SSH Disk Free Sensor
SNMP Disk Free Sensor

Best regards.

Created on Mar 10, 2017 10:15:30 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

thank you, but I asked for used disk space, not free disk space. vmdk can be extented on every time - so free disk space is not best value if you want to see what happend on your Systems.

Does anyone know how to monitor used disk space?

Created on Mar 10, 2017 10:40:47 AM



Votes:

0

Hi there,

You could create a WMI Custom Sensor to monitor the Disk Size for Windows Server, the Query would be:

Select Size FROM Win32_LogicalDisk WHERE DeviceID=<device_id (e.g. "C:", "E:")>

To get the disk size for Linux Servers, use the following SNMP OID (X = Index of the Disk, use the SNMP-Tester to find out) and the SNMP Custom Advanced Sensor:

1.3.6.1.4.1.2021.9.1.6.X

Best regards

Created on Mar 10, 2017 11:42:25 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

That query, select size, only gives the max drive size. I believe you could do this bye subtracting free from size? Or is there another way to grab the used via WMI?

How do you do math from inside the WQL files? Assign the return from that select to a variable, the free size to another and subtract the two and it returns the output of all of them?

Created on Apr 20, 2018 1:20:16 PM



Votes:

0

Hi there,

Unfortunately, due to the WMI Limitations it is not possible to do any further processing or math in a WQL-Query. As mentioned far above, you can use the default sensors of PRTG which already do the entire math in the background.

Best regards.

Created on Apr 20, 2018 4:31:47 PM by  Dariusz Gorka [Paessler Support]



Accepted Answer

Votes:

0

OK I wanted to provide a work around for this user and I did find one using Sensor Factory.

  1. set up the default disk free monitor (just producing the disk free)
  2. set up the size as suggested above
  3. set up a Sensor Factory (search for it in add sensors)

Default formula:

#<id>:<name>[<unit>]
<formula>

Formula in my case:

#99977:EDriveUsage
(( channel(4676,0) - channel(4672,8) ) /  1048576 )

How this breaks down, ID is just arbitrary but needs to be unique. Name is also Arbitrary Channel 4676 in my case is the id of the WMI query for disk size, inside that if you look at one of the graphs you can see the second value (the stream I believe), The next channel in my case was 4672, that was the value of the default disk space free WMI. The last pieces was dividing to bring it into MBytes vs Bytes.
Hopefully that helps some folks!

Created on Apr 20, 2018 6:31:17 PM

Last change on Apr 23, 2018 7:39:28 AM by  Dariusz Gorka [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.