Obtain Compute Hosts/Hypervisor Info Using API
Problem
A user would like to use the OpenStack API to obtain information about Hosts/Hypervisors in OpenStack environment, such as current CPU usage/allocation, Memory usage/allocation, Storage usage/allocation, etc, similar to what is shown in the Clarity UI.
Environment
- Platform9 Managed OpenStack - v3.6.0 and Higher
Procedure
- The following
curl
command using your Management Plane's Nova API endpoint can be used to get the details of a hypervisor in Platform9 Managed OpenStack.
The above will list all the details of all the hypervisors in the environment.
- One can apply
jq
filters to obtain the required information from the list of hypervisors.
Additional Information
One can get the TOKEN and [Project Id] to be used in the command mentioned above by running the following command.
Was this page helpful?