Monitoring vcenter services using vmware REST API’s

By | 8th February 2018

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.

API DETAILS:

https://code.vmware.com/apis/60/vcenter-server-appliance-management#!/vmon47service32/get_appliance_vmon_service_service

example:

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.

Screenshot/Output:-

Code:

https://github.com/rajeevrn/myscripts/blob/master/vmware/vcenterapi_healthservices.py

Leave a Reply

Your email address will not be published. Required fields are marked *