Please refer this script to monitor the service status
if the service was stopped then the script tries to restart the service and send the appropriate alert.
Service = Mention the service name to restart.
Service = "ITSMService"
Please refer the wiki guide for how to use the custom monitoring scripts: