top of page

Capture VM Rightsizing Data with the Aria Operations API

Brock Peterson

One of the main pillars of Aria Operations is Capacity Planning: Assesssing, Reclamation, and Rightsizing. Rightsizing gives us visibility into capacity available to be reclaimed, should we rightsize our VMs.

It presents that data at the Datacenter and Cluster levels via the UI, but it's also available at the ESX Host level via the API. Let's take a look.


Rightsizing data is available via the Internal API, there are 3 rightsizing related endpoints.

To capture rightsizing data we'll use the GET /internal/optimization/{id}/rightsizing endpoint.

I set X-Ops-API-use-unsupported to true to acknowledge that it's unsupported. I set groupAdapterKind to VMWARE, as the vCenter adapters capturing this data are VMware groupAdapterKind, as shown here via the public API GET /api/adapterkinds.

This shows the possibilities for groupResourceKind too: Datacenter, ClusterComputeResource, HostSystem, and more.


Finally, I need the ID of the object I'll run the call against, we'll start with Datacenter vcfcons-mgmt-dc01. To capture this, run GET /api/resources and search for it.

Now we can complete our call, it looks like this.

Which as you can see, matches what we show in the UI for that Datacenter.


We can do something similar for a Cluster, which looks like this.

Looking at the Response body in more detail, you can see we get the Cluster level numbers, but also get the VM details in that Cluster.


We can do the same against the ESXi Host ResourceKind, like this.

Exploring the Response body gives you more details on the rightisizing numbers related to just that ESXi Hosts and the VMs on it.

There is more you can do here, including using the vmNameFilter to capture just VMs you want.

This should get you started with capturing VM rightsizing data via the Operations API, enjoy!

Comments


    bottom of page