I'm looking for an easy way to monitor free disk space on a large number of servers.
I would also like to be able to count files in certain folders on those servers
I'm looking for an easy way to monitor free disk space on a large number of servers.
I would also like to be able to count files in certain folders on those servers
From http://technet.microsoft.com/en-us/magazine/cc137791.aspx: create a file C:\Computers.txt with the names of the machines you wish to check, then execute this PowerShell script:
You may wish to re-format that; it's pretty ugly, but works ;)
Edit: of course, you'll need to have appropriate security privileges to query other machines.
Your answer lies in Powershell but I lack the programming knowledge in that language to give you an exact solution
I think it depends on what you're using for a monitoring system. Nagios has NSC++, you can always setup a Windows based snmpd, and various commercial monitoring software packages provide other agents for you to install.
Do you have a monitoring system up and running yet, or is that what your goal is?
Zenoss is a good tool combined with SNMP informant. Another that costs money would be PRTG. Both are very easy web based systems to set up. Zenoss comes as a preconfigured virtual machine also that can be easily used.
We use ServersAlive to handle our monitoring. Has builtin disk space and files in folder monitoring.
Counting the number of files in a directory will require scripting but you can use perfmon to monitor disk space. You can also have it alert you if certain thresholds are met. You can use perfmon on a central system and connect it to your servers so all the monitoring is performed in one location.
To count files (from the command line) see http://ratsauce.sourceforge.net/index.html#dirspace.
What do you plan to do with the disk space figures? For example will you be running regular queries of them to generate reports? I have a similar requirement, and I use a mix of batch files and VBScript to write the figures into a SQL database. That allows me to generate warnings when disk space is low, but also to track disk usage over time and even predict when disks will fill up.
John Rennie
I've been using diskmonitor pro for a few months, its cheap and does the job well.
Got it from www.diskmonitor.net
Hope this helps.
The 'easy way' as far as I'm concerned is to turn on SNMP, and poll each server from a Nagios box. You'll then not only be able to monitor disk space, but many other aspects including (but not limited to) CPU usage, processes, services, memory, network I/O, hardware, etc.
It's a no brainer if you know Nagios :)