Can SCOM monitor two servers with the same service and if one service stops the other starts

stuart williams 6 Reputation points
2022-10-10T09:04:41.573+00:00

Hi all,

Thanks in advance

Here is the scenario:

Two servers (Server A and Server B)
Both servers have a service on them (service ABC123)
Server A has service ABC123 running and Server B doesn't have it running.

The task and question is:
Can SCOM monitor Server A and the service, so if the service stops on Server A; SCOM will start the Service on Server B immediately?
If it can, how do you do it?

Cheers again.

StuStu

System Center Operations Manager
System Center Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,603 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. SChalakov 10,576 Reputation points MVP Volunteer Moderator
    2022-10-12T09:21:10.167+00:00

    Hi @stuart williams ,

    @XinGuo-MSFT already gave a hint how this can be accomplished - you need to create a Recovery Task for the Service Monitor (monitoring the service on Server A), which will then connect to Server B and will start the service there....

    Here are a couple of refeerences, which depict the steps needed, you just need to adjust the script part to do this on Server B, instead of locally.

    HOW DO I: MONITOR A SERVICE AND AUTOMATICALLY RESTART IT IF IT STOPS (SCOM 2012)
    http://www.opsconfig.com/how-do-i-monitor-a-service-and-automatically-restart-it-if-it-stops-scom-2012/

    SCOM 2012 – Recovery Task Script For Restarting A Windows Service And Depending Services
    https://www.stefanroth.net/2012/11/14/scom-2012-recovery-task-script-for-restarting-a-windows-service-and-depending-services/

    If I had to do this, I would definetely take the PowerShell way, just becasue it is a lot easier to do PowerShell remoting instead of using VBS or cmd commands to achieve the same. Here some hints:

    Powershell as recovery task - SCOM 2016
    https://social.technet.microsoft.com/Forums/en-US/0f57e65b-a1bf-4515-aee0-96beb6ff9a4b/powershell-as-recovery-task-scom-2016?forum=operationsmanagerauthoring

    SCOM – Powershell Recovery Action – Stopped Windows Service
    https://dynamicdatacenter.wordpress.com/2017/08/31/scom-powershell-recovery-action-stopped-windows-service/

    Last, but not least: the actual way of doing this properlyy would be creating a Windows Failover clustre with Server A and B as nodes in the cluster and configuring the Service as a cluster resource. This way, if the service stops on Server A, Server B will step up and start the resource automatically.

    I hope I could help you out!

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
    Regards
    Stoyan Chalakov

    1 person found this answer helpful.
    0 comments No comments

  2. XinGuo-MSFT 22,231 Reputation points
    2022-10-11T08:13:50.337+00:00

    Hi,

    Open the monitor on authoring console, and choose the "Diagnostic and Recovery" tab, we can create recovery task for that monitor.

    We could use the Run Script trigger to start the service ABC123 on Server B.

    249276-untitled-picture.png

    0 comments No comments

  3. stuart williams 6 Reputation points
    2022-10-12T15:51:09.013+00:00

    Hi both

    Thank you for your suggestions.

    I will try test these asap.

    I will let you know if they are successful.

    thanks again

    StuStu

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.