I have a SAM application monitor that has 2 component monitors - a Windows service monitor to verify the service for the application is up, and an HTTP monitor to verify that the web content of the application is up. I want to create these alerts for the application monitor:
1) An alert to restart the Windows service if it's down. This one is easy using the external program call "APM\APMServiceControl.exe ${N=SwisEntity;M=ComponentAlert.ComponentID} -c=RESTART".
2) An alert to restart the Windows service if the service is up, but the web page isn't working. Is this possible? If the alert is a component level alert, the component that's failing is the HTTP monitor, so would the alert have access to the ID of the Windows service monitor? Is this possible if I create an application level alert instead of component level? Are there variables that have the component IDs for all component monitors under an application monitor?
Thanks
Bob