Script to start the healthservice service in the event of a heartbeat alert

Brian W 61 Reputation points
2022-01-27T12:28:10.893+00:00

Does anyone have a script that I can execute as a recovery task to start the agent service in the event it's stopped. I need a way to remotely execute something against the source of a heartbeat alert to attempt to start the service in the event it's stopped.

Operations Manager
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,417 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andrew Blumhardt 9,496 Reputation points Microsoft Employee
    2022-01-27T19:36:00.237+00:00

    Check out the optional recoveries in the Health Service Heartbeat Failure monitor overrides. There are some built-in options there. There are some community helper MPs like the one provided by Cookdown that can perform similar tasks. SCOM does a good job of maintaining the agent. That level of automation is rarely needed. You may also consider increasing the delay or repeat count to reduce heartbeat alerts.

    1 person found this answer helpful.
    0 comments No comments