?
Solved

Programatically monitor diskspace in remote windows servers

Posted on 2010-03-25
8
Medium Priority
?
353 Views
Last Modified: 2012-05-09
I would like to know is there any way to write a program in any language to monitor diskspace of windows remote servers.

i would like make a monitoring webpage to see all the servers which reached the diskspace upto a threshold.

0
Comment
Question by:PeteEngineer
8 Comments
 
LVL 4

Accepted Solution

by:
bcolladay earned 668 total points
ID: 28575684
If all of the servers have IIS and access through a public IP, you could have web services on each server that does soemthing like this:

http://authors.aspalliance.com/brettb/ASPDiskMonitoringScript.asp

You could then monitor each server by calling the Remote Web Service periodically.

Or vice veersa periodically check the status on the Remote Server and send data to a web service on your local web server.
0
 
LVL 21

Assisted Solution

by:mastoo
mastoo earned 668 total points
ID: 28575749
Yes, you can make wmi calls to get this.  Google on wmi disk space will yield samples.  The biggest problem is usually opening up server security to let the calls through.  I thought I'd suggest you might take think about using one of the free snmp monitoring packages.  They nicely monitor disk space and everything else you might care about, and include various kinds of alerting mechanisms..  I've been using zenoss, but the other ones I see recommended are Big Brother, Nagios, NINO, and OpenNMS.  I presume they all include disk space monitoring.
0
 
LVL 10

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 664 total points
ID: 28582345
If the remote location is on your hand, means on the same network from where you want to run the application then you can go with this one.

Map the drive which you want to monitor on your application machine.... let say its a G:

then

using System;

using System.Management;

...

ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid="G:"");

disk.Get();

Console.WriteLine("Logical Disk Size = " + disk["Size"] + " bytes");

Console.WriteLine("Logical Disk FreeSpace = " + disk["FreeSpace"] + " bytes");



If the remote machine is on in your hand, means you are not able to access the machine directly then you can create some kind of service using the above code on that machine locally and then use that service remotely .....
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 8

Author Comment

by:PeteEngineer
ID: 28583490
Cool ..is this any way make holes in firewal ....or create security concerns ..i am using windows 2003 servers
0
 
LVL 10

Expert Comment

by:Alpesh Patel
ID: 28584489
which kind of remote calling you are expecting

i think if you are using .net remoting then u dont need to hole firewal
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 28584576
does the management object a part of remoting?
0
 
LVL 10

Expert Comment

by:Alpesh Patel
ID: 28584669
no it is just a assemble..... you can use anywhere..... but which kind of firewall hole you want.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 28584824
i dont want a hole :-O

:-)

just asking whethere it make any security concern and is it possible to monitor SQl server db sizes as well :-)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to count occurrences of each item in an array.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question