There is a built-in feature in the product to automatically restart Virtual Services that go down for some reason. These options are available during deployment and also from PORTAL VSE Monitor page. However Auto-Restart will not work if anyone STOPS the Virtual Service Manually and in such cases, you could use the following approach to monitor and start virtual services that someone accidentally stops.
This was a question that I recently answered for a community question. An user wanted to know if there is a way to continuously monitor running virtual service and do the following when anything goes down due to someone manually shutting a virtual service:
1. Notify an Admin through email about the event
2. Automatically start the Virtual Service(s) that went down due to someone stopping the Virtual Service
Both the requirements were met by implementing a simple test case, which does the following: