x404.co.uk
http://x404.co.uk/forum/

Software that alerts when a service stops
http://x404.co.uk/forum/viewtopic.php?f=4&t=1749
Page 1 of 1

Author:  james016 [ Tue Jul 14, 2009 8:10 am ]
Post subject:  Software that alerts when a service stops

Hi

Does anyone know of any software that can send an email alert when a service stops. We have a call recording package and every so often one of its services just stops. The built in Performance and Alerts does not cover this.

The software runs on Windows XP

Thank you

Author:  saspro [ Tue Jul 14, 2009 9:37 am ]
Post subject:  Re: Software that alerts when a service stops

We use hounddog monitoring on all our servers and that can be set to do that.

Or batch file an email & set the service to run it when it fails

Author:  james016 [ Tue Jul 14, 2009 10:54 am ]
Post subject:  Re: Software that alerts when a service stops

How would I go about making a batch file for this?

I've never really delved into scripting at this level.

I will look at HoundDog as well.

Author:  AlunD [ Tue Jul 14, 2009 11:07 am ]
Post subject:  Re: Software that alerts when a service stops

I use this
http://www.woodstone.nu/salive/

Author:  saspro [ Tue Jul 14, 2009 11:46 am ]
Post subject:  Re: Software that alerts when a service stops

AlunD wrote:


Looks good.

Free trial with no time limits?

Author:  AlunD [ Tue Jul 14, 2009 11:49 am ]
Post subject:  Re: Software that alerts when a service stops

saspro wrote:
AlunD wrote:


Looks good.

Free trial with no time limits?

Last time I downloaded it was. ( I have the executable if needed. ) :D

Author:  saspro [ Tue Jul 14, 2009 12:39 pm ]
Post subject:  Re: Software that alerts when a service stops

Just running a test now, I like no time limits.
Might even buy it for work.

Author:  AlunD [ Tue Jul 14, 2009 12:42 pm ]
Post subject:  Re: Software that alerts when a service stops

Really surprised you haven't come across it before. It's much industry standard, well at least I thought it was.

Author:  Fogmeister [ Tue Jul 14, 2009 4:32 pm ]
Post subject:  Re: Software that alerts when a service stops

I do this...

Code:
@echo off

set loglocation=\\server1\C$\HettonLogs\HettonServiceLog.log

sc \\server1 query "Hetton integration service" | find /I "4  RUNNING"
IF "%ERRORLEVEL%"=="0" GOTO RUNNING
IF NOT "%ERRORLEVEL%"=="0" GOTO STOPPED

:RUNNING
date /t >> %loglocation%
time /t >> %loglocation%
echo Hetton integration service running >> %loglocation%
GOTO LINE

:STOPPED
date /t >> %loglocation%
time /t >> %loglocation%
echo Hetton integration service stopped! >> %loglocation%
echo Starting service ... >> %loglocation%
sc \\server1 start "Hetton integration Service"

ping localhost -n 11 > nul

sc \\server1 query "Hetton integration service" | find /I "4  RUNNING"
IF "%ERRORLEVEL%"=="0" GOTO EMAIL
IF NOT "%ERRORLEVEL%"=="0" GOTO STOPPED
GOTO LINE

:EMAIL
echo Service started successfully! >> %loglocation%
c:\AdminScripts\HettonEmail.vbs
GOTO LINE

:LINE
echo. >> %loglocation%

and put it in a scheduled task.

hettonemail.vbs contains ...
Code:
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "server"
objEmail.To = "email address"
objEmail.Subject = "Hetton Integration Service"
objEmail.Textbody = "Hetton Integration Service had stopped running.  Restarted succesfully!"
objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "VPEXB2"
objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
and sends an email to the email list.

Works very well. Runs every houir to check the service.

If it's running it logs that it's ok.

If it has stopped then it restarts it, emails to let us know and logs it.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/