Link to home
Start Free TrialLog in
Avatar of ACIAR
ACIAR

asked on

Email Alert system for Win 2003 Server Crashes

Hello,

Im after a way that I can recieve a email if certain servers in the domain crash. I thought their might be a program that simply ping's the servers periodically and emails you if the ping fails but I cant seem to find anything yet. Even an email alert when certain services stop running would be useful.

Does anyone know of a way to do this ?

Thanks
SOLUTION
Avatar of TG Tran
TG Tran
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ACIAR
ACIAR

ASKER

Hello Mass2612,

A couple of questions if I was to use this approach. Im not so familiar with VB scripts so I need to clarify a few questions

* You have 3 different file names mentioned: server.txt || cscript.exe || pingservers.vbs - I think I name the text you provided above and name that pingservers.vbs. With the server.txt file I assume I have to put in the IP address's or Server hostnames - but in what format ??? And lastly what is the cscript.exe file for?

You need to modify the code for the SMTP address info on lines 31, 32, 33 and 34 in the code above.

Aside from that its very simple. Create a directory to store the files i.e. C:\Script\Ping_Script.

Save the code above as a vbs file i.e. pingservers.vbs in C:\Script\Ping_Script.

Create a txt files called servers.txt in C:\Script\Ping_Script. The contents of servers.txt should just include either the hostnames or IP addresses of the servers/Ip's you wish to monitor (hostnames are best): -
Server1
Server2
Server3
etc

Create a batch file or cmd file called pingservers.cmd in C:\Scripts\Ping_Script with the following command: -
cscript.exe pingservers.vbs

Setup a scheduled task to run C:\Scripts\Ping_Script\pingservers.cmd every so many minutes. We do this every 20 minutes so if a box goes down we get an email.

cscript.exe is the Windows executable for vbs scripts cscript runs in a command line mode wscript.exe runs in a Windows/GUI mode.
Avatar of ACIAR

ASKER

Did you mean line 38 not line 34 ?
Avatar of ACIAR

ASKER

Opps - "Did you mean line 38 not line 31"

I cant see what im meant to change on 31 ?
Forgot about line 38. You need to change that as well. You also need to change the email addresses: -
support@company.com
Avatar of ACIAR

ASKER

Hello Mass2612 and tgtran,

I found a server monitoring program that meet my requirements however you have both helped me head in the right direction so ill award points between the 2 of you.

Thanks for the help and thanks Mass2612 for the effort on your part, I think I can also use your method aswell if I ever need to.