Have you ever wanted to detect a monitoring condition on an agent (Lets call it ProdWebser-01) and follow up the condition with a custom <WriteAction ….> to either remediate the issue or get additional data for the alert?
Great Idea, leveraging the agent is one of the best strengths of SCOM. Check out this MSDN link for some more information. https://msdn.microsoft.com/en-us/library/ee533886.aspx
I like the detection, but I want this to run on another server.
That seems reasonable, but looking at the previous link there isn’t a lot of information on how you could do it, and definitely no examples. Well, the Microsoft documentation left out a parameter. The <WriteAction/> Schema includes a ‘Target’ parameter which will do exactly what you’re looking for.
Below is an Example of a Pack I wrote, in this example the write action is executed on the management server responsible for the agent, not directly on the agent. Try the Target parameter as you see below and see how it works for you.
<WriteAction ID=”WriteToES” TypeID=”PCMML!P2P.Library.WriteToElasticSearch” Target=”SC!Microsoft.SystemCenter.CollectionManagementServer”>