Jump to content

Tool to email if server is up or down?


Recommended Posts

Posted

Is there a free tool to tell me if a server goes up or down? I have about

15 machines.

  • Replies 4
  • Created
  • Last Reply
Guest Brett I. Holcomb
Posted

Re: Tool to email if server is up or down?

 

We use nagios - I believe it's open source. It runs on a machine and

watches the others. Not sure if it has a windows version for it's

server stuff.

 

On Sun, 18 Nov 2007 18:27:16 -0000, "Gonzo" <apollo13@btinternet.com>

wrote:

>Is there a free tool to tell me if a server goes up or down? I have about

>15 machines.

>

Guest Pegasus \(MVP\)
Posted

Re: Tool to email if server is up or down?

 

 

"Gonzo" <apollo13@btinternet.com> wrote in message

news:u%23LjlChKIHA.5400@TK2MSFTNGP04.phx.gbl...

> Is there a free tool to tell me if a server goes up or down? I have about

> 15 machines.

>

 

You could set a policy on each machine to execute

a startup/shutdown batch file of the following form:

 

@echo off

echo Server "%ComputerName%" went up on %date% at %time% > c:\log.txt

c:\tools\blat.exe c:\log.txt -Subject "Server %ComputerName% notification"

/.. /..

 

Blat.exe is a command line mailer. You can download it

from a number of sites. Of course you won't get a shutdown

notification if a server crashes . . .

 

To find the policy settings, run GPEDIT.MSC, then open up

- Local Computer Policy

- Computer Configuration

- Windows Settings

- Scripts (Startup / Shutdown)

Guest Pegasus \(MVP\)
Posted

Re: Tool to email if server is up or down?

 

 

"Gonzo" <apollo13@btinternet.com> wrote in message

news:u%23LjlChKIHA.5400@TK2MSFTNGP04.phx.gbl...

> Is there a free tool to tell me if a server goes up or down? I have about

> 15 machines.

 

As an afterthought to my initial reply: You can use much

the same technique to monitor if any of your servers go

down, even when crashing. Use the Task Scheduler to

run the following batch file on your own PC once every

10 minutes:

 

@echo off

if not exist c:\ServerLogs md c:\ServerLogs

if not exist c:\ServerLogs\Servers.lst cd 2>c:\ServerLogs\Servers.lst

 

for /F %%a in (c:\ServerLogs\Servers.lst) do call :Sub %%a

goto :eof

=====================

:Sub

echo Processing %1

ping %1 | find /i "bytes="

if %ErrorLevel% EQU 0 goto :OnLine

 

:OffLine

if exist c:\ServerLogs\%1.down goto :eof

echo Server "%1" went down on %date% at %time% > c:\ServerLogs\%1.down

echo c:\Tools\blat.exe c:\ServerLogs\%1.down /Subject "Server outage: %1"

/.. /..

goto :eof

 

:OnLine

if exist c:\ServerLogs\%1.down del c:\ServerLogs\%1.down

 

The file c:\ServerLogs\Servers.lst contains a list of all servers.

Best to copy & paste this script, and watch out for line wraps!

  • 1 month later...
Guest Jack Doyle
Posted

Re: Tool to email if server is up or down?

 

Brett I. Holcomb wrote:

> We use nagios - I believe it's open source. It runs on a machine and

> watches the others. Not sure if it has a windows version for it's

> server stuff.

 

I used to use Nagios myself. I don't believe there is a Windows version

per se, but there is a Windows agent that you can install so that it can

monitor Windows servers. Take a look here:

http://www.nagiosexchange.org/Windows.49.0.html

 

--

 

Jack Doyle, Systems Engineer

ScriptLogic Corporation

http://www.scriptlogic.com


×
×
  • Create New...