Setup your own Monitoring – Disk Space Utilization Monitoring tool for free

It is always recommended to keep tracking of the disk space utilization for you servers. This will help us to get the idea of our future requirement. There are multiple tools available for track this but you have to pay for most of them. Recently I also had similar kind of requirement and I was asked to provide the free solution for this.

There are some free tools available but all of them having some short of limitation, and also for security reason, it is not recommended to install any free tools on the server. So, I had to look for some alternatives, and I thought why we don’t use the PowerShell to get the disk space utilization details daily and kept it in MS Access database using Microsoft Access Database Engine 2010, which is available for free.

Requirements:

How to Setup:

First you have to download and install MS Access Database Engine. Once the installation complete, you have to create a blank database with a table name DiskUtilization which will have following field.

image001

image003
If you do not have MS Access installed, then you could also download and use the following blank database for Disk Utilization.

  DiskUtilization (560.0 KiB, 462 hits)


Place the database file to D: or anywhere you like.

Now you have to create a System DSN using ODBC by selecting Microsoft Access Driver (*.mdb, *.accdb)

image005

Now select the database from D:DiskUtilization.accdb

image007

 


Once everything is set you have to schedule the following PowerShell script to execute on daily basis. You also have to put all the Target Server Names or IP Addresses to the file called Servers.txt (One in each line) and update the first line of the script with the location of that file.

Once the script execute, it will start collecting the data in following format.

image009

Tips:
Smiler to DiskUtilization you can easily create MemoryUtilization or CPUUtilization by using following WMI Classes
For CPU > Win32_PerfFormattedData_PerfOS_Processor
For Memory > Win32_OperatingSystem

How to Use this data to Represent:
You can easily import this data to excel and create trend analysis using pivot table and graph.

Please let me know whether you like it or not.

Update : There is a limitation in Get-WmiObject, if the WMI is broken in target system, this script will get stuck, to avoid this I have updated the script to use Get-WmiObject with Job loop, which will terminate the  Job after 20 seconds.

Disclaimer: All posts and opinions on this site are provided AS IS with no warranties. These are my own personal opinions and do not represent my employer’s view in any way.

One thought on “Setup your own Monitoring – Disk Space Utilization Monitoring tool for free

  1. Pingback: Multi-Threading Super-Fast Disk Utilization Report using Background Jobs in PowerShell | Techno Chat|Tech Blog!!

Leave a Reply

Your email address will not be published. Required fields are marked *