There are various services in vcenter which we might need monitor and check if they were running.
Using the Rest API was easier choice for me since I had written some small scripts using rest based services of vcenter.
List of services to monitored are to be updated in the file, the script will check each of the service and update if it is running or not.
Listed all the services in my text file and check for each of them.
(‘/home/rajeev/vservices.txt’) and checked if they were running or not.
This can be modified based on the requirement.