Did this a while ago - may help.....
Were having a few problems here with servers going down overnight (when no one is here) and at weekends.
Now the problem with the servers is with the suppliers, but in the mean time it would be good to be notified when they went down.
Just wondering if there is a simple programme that can be run in the background to ping the servers and send an e-mail when they go down.
Well, i may have a look at that, unfortunately as we only have server 03/08 it could be tricky.
thanks, but im not sure that's quite what i'm after.
What we need is a programme to e-mail us so we can note when it goes down, and so it can e-mail us to i can pick it up on BB or e-mail at home. or at least have a fairly accurate time when it came down so we can look at logs, etc.
something like this unsophsticated batch file method?
Code:REM Compare results of ping command when server is off and the current status REM If they are the same assume server is off and send email REM off1.log is the result of "Ping SERVER1-IP" when the server can't be contacted REM bmail from http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm REM sleep from Windows 2003 Resource Kit @echo off :Start REM Server 1 ping SERVER1-IP >live1.log fc off1.log live1.log >nul if errorlevel 1 ( bmail -s SMTP-SERVER -t TO -f FROM -h -a "Server 1 Down" -b "Opps, Server 1 down at %time%" ) REM Server 2 ping SERVER2-IP >live2.log fc off2.log live2.log >nul if errorlevel 1 ( bmail -s SMTP-SERVER -t TO -f FROM -h -a "Server 2 Down" -b "Opps, Server 2 down at %time%" ) REM ETC..... REM Wait 60 seconds Sleep 60 REM Return goto start
We use P-Ping, have 3 servers running this tool and it monitors out 170 firewalls/sites plus a few other key things. Emails sent roughly every 6 minutes by the time it has gone through its cycle we have. Can often walk into several thousand emails after the weekend. Only tend to pay attention when we have 3 pings or more from site.
There are currently 1 users browsing this thread. (0 members and 1 guests)