top of page

VCF Operations Custom Groups, Custom Properties, and Super Metrics

  • Writer: Brock Peterson
    Brock Peterson
  • 1 day ago
  • 2 min read

I have a Custom Group of VMs and would like to know the number of total VMs in my environment minus the number of VMs in this Custom Group. I first considered a Super Metric against vSphere World taking Total VMs minus Custom Group Population (which is a metric on all Custom Groups), but there is no relationship between vSphere World and Custom Groups, so this didn't work.


Alternatively, if I had a way to identify all VMs in my Custom Group I could use that, as VMs have a clear relationship to vSphere World. I was able to put a Custom Property on all VMs in my Custom Group using Custom Properties, then use that in my Super Metric, here's how.


My Custom Group of VMs looks like this. All screenshots here are taken from my VCF Operations 9.0.2 lab.



In step 4 I assign a Custom Property to all VMs in this Custom Group.



We've discussed Custom Group Custom Properties previously here. Once done, the VMs in my Custom Groups present with this Custom Property.



I can now create a Super Metric against vSphere World taking all VMs and subtracting the VMs with this Custom Property. It looks like this.



The Super Metric itself looks like this, if you'd like to have it you can get it here.

{‌This Resource: ‌summary|total_number_vms}-count({‌Virtual Machine: ‌Custom Properties|ownertag, depth=5})

We can now use this metric in Dashboards/Views to show the totals, something like this.



If the VMs in your Custom Group share a common name (or something similar), an alternative to using Custom Group Custom Properties would be something like this.

{‌THIS: ‌Summary|Total Number of VMs}-count({‌Virtual Machine: ‌Configuration|Name, depth=5,where=($value contains 'bpeterson')})​

Here I've taken the Total Number of VMs and subtracted the Number of VMs that contain the string 'bpeterson' in their name. If you'd like this Super Metric you can get it here. Hope this was helpful, enjoy!

    bottom of page