question

GeorgeChristianis-0199 avatar image
0 Votes"
GeorgeChristianis-0199 asked GeorgeChristianis-0199 commented

How to pass SCOM Alert details to a recovery script

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

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CyrAz avatar image
1 Vote"
CyrAz answered GeorgeChristianis-0199 commented

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.

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

hi CyzAz,

thank for your replying.

that explains it why I was not able to obtain the details from the recovery :(

Oh that would be extremely difficult to obtain the current alert of the alert which we are working on :(

As well, accoring to what you have mentioned, "the recovery is triggered at the same time as the alert is triggered, not after it" Then Get-SCOMalert won't be able to obtain anything as well

.
I am waiting for further classifications.

Thanks



0 Votes 0 ·
CyrAz avatar image CyrAz GeorgeChristianis-0199 ·

Well, Get-SCOMAlert could run in some kind of loop until the alert is created. But that's definitely not a great solution...

0 Votes 0 ·

I agree its not a great solution. My only way around this , would be to use SCORCH?

0 Votes 0 ·
Show more comments

Hi,

How's everything going? Have we figured out this problem with the command channel suggested by CryAz? Or is there any other assistance that we can provide?

Regards,

Alex
If the response is helpful, please click "Accept Answer" and upvote it.

0 Votes 0 ·

Hi,
No, I have not figured out the solution using the command channel yet.
thank you for asking and your help

regards George

0 Votes 0 ·