I have a Windows Event Monitor that scans for a specific error that correlates with a failed application. The solution is to restart a Windows Service.
I can restart a service via an Alert action but generally that requires monitoring of the actual service to get the service name from the component ID APM\APMServiceControl.exe ${ComponentId}. I cannot do that in this case as I am monitoring the event not the service. Even if I were monitoring the service, it does not go down when it fails so I could never pull the name into a variable.
I thought about hardcoding the APM\APMServiceControl.exe "service name" however the service name isn't consistent across the monitoring group. Pulling the service name as a variable is ideal.
Is there a simple way to do this with SAM and Advance Alert manager?