techresearch7777777

New Member
Joined
Mar 19, 2020
Messages
5
Hello I have 3rd party monitoring App tool that has it's own particular sservice running within Services panel and needs to continue to run.

For some strange reason it sometimes gets stopped (maybe bug).

I recently successfully configured Task Schedule in regards for Event ID = 7036 & Source = Service Control Manager (service stopped state) using this site's instructions:

“Send an e-mail” -Windows Server 2012 Task Scheduler deprecated feature [SOLVED!]

But it's emailing me for other different services that has this Event ID and gets put into Stopped State while my 3rd party monitoring app service is good up and running.

Is there a way to filter only my 3rd party's app service on the email alerts or are there any other methods to achieve this?

Thanks in advance.
 


Solution
I would just have a powershell script that runs every 5 minutes or so.
Code:
$service = Get-Service -Name "ServiceName"

if($service.Status -ne "Running") {
    Start-Service -Name "ServiceName"
    Send-MailMessage -To [email protected] -From "[email protected]" -Subject "Service Halted" -Body "Service : X has stopped running, restarting service" -SmtpServer somesmtpserver
}

You can make the script more intelligent if needed, but this is just a very basic one.
I would just have a powershell script that runs every 5 minutes or so.
Code:
$service = Get-Service -Name "ServiceName"

if($service.Status -ne "Running") {
    Start-Service -Name "ServiceName"
    Send-MailMessage -To [email protected] -From "[email protected]" -Subject "Service Halted" -Body "Service : X has stopped running, restarting service" -SmtpServer somesmtpserver
}

You can make the script more intelligent if needed, but this is just a very basic one.
 


Solution
basic stuff keeps working long after the BS stops
 


Back
Top