How to pass SCOM Alert details to a recovery script

George Christianis 21 Reputation points
2021-10-15T19:57:08.367+00:00

HI, I would like to pass the following:

1) Alert Name
2) Server Name
3) Ticket # which is stored in a custom field
To my SCOM Recovery so it can perform an autoremediation. How can I obtain these values?

Thank you

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

1 answer

Sort by: Most helpful
  1. CyrAz 5,176 Reputation points
    2021-10-16T14:35:07.447+00:00

    That's not possible because the recovery is triggered at the same time as the alert is triggered, not after it; so the alert doesn't exist yet when the recovery starts and therefore it can't access the alert properties, at least not in the form of a SCOM workflow variable.

    One workaround would be to use a Get-SCOMAlert cmdlet in the recovery with some mechanism to make sure it gets the details of the proper alert, but that would make it much heavier.

    1 person found this answer helpful.