wdabbs
asked on
How do I create a simple program or script that will notify me when one of our servers is down?
We have about a dozen Windows servers in our office, some of which are virtual. Some of the less-essential servers go down on occasion and I don't know about it untl after a problem has arisen. For example, we have a fax server that will go down sometimes and I won't know until customers call and say they can't fax something to us.
I thought about running a batch file or script that would ping each server on the hour and let me know if the ping fails. Then I realized we have one server where being powered on isn't enough -- it must be logged in, so a startup program can launch (for some reason it won't start as a system service).
What can I do to monitor my servers in an old-school way that involves some simple scripting? I'd be willing to use an open-source program to handle it if one exists, but this isn't something I want to throw hundreds of dollars at (with a commercial program) when I know can do it for free either on my own or with a program someone else has already written for this purpse. I am decent with batch files and I've done some beginner stuff with C++ and VB scripting. What's the best way to attack this problem?
I thought about running a batch file or script that would ping each server on the hour and let me know if the ping fails. Then I realized we have one server where being powered on isn't enough -- it must be logged in, so a startup program can launch (for some reason it won't start as a system service).
What can I do to monitor my servers in an old-school way that involves some simple scripting? I'd be willing to use an open-source program to handle it if one exists, but this isn't something I want to throw hundreds of dollars at (with a commercial program) when I know can do it for free either on my own or with a program someone else has already written for this purpse. I am decent with batch files and I've done some beginner stuff with C++ and VB scripting. What's the best way to attack this problem?
I would recommend Powershell. You could use a very simple script to connect to each server and let you know the Current Uptime and check specific services.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
@RobSampson:
Thanks for the script, I like it. How can I use it to notify me by email? Do I need a separate routine to monitor that log file and look for errors?
Thanks for the script, I like it. How can I use it to notify me by email? Do I need a separate routine to monitor that log file and look for errors?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks for the grade. Sorry for not replying...I've been busy....I hope you've managed to piece together the emailng code...
Regards,
Rob.
Regards,
Rob.
wdabbs
Did you get this to work togeather?
If yes can you post the final post please... So we can use them....
Did you get this to work togeather?
If yes can you post the final post please... So we can use them....
http://www.nagios.org/