If you want to monitor a Service and run a predefinded recovery task follow this walkthrough: