top of page

Capture VM Rightsizing Data with the Aria Operations API

  • Writer: Brock Peterson
    Brock Peterson
  • Jan 26
  • 2 min read

Updated: Aug 23

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.


ree

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.


ree

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


ree

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.


ree

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.


ree

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


ree

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


ree

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


ree

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.


ree

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


ree

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


ree

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


ree

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

    bottom of page