VMware {code}

 View Only

 Aria Operation Super Metrics

Shaun Williams's profile image
Broadcom Employee Shaun Williams posted Aug 06, 2025 04:01 PM

I'm trying to create a super metric for ESXi hosts that displays the "licensed cores" in a scenario where the ESXi hosts have less than 16 cores per socket. 

It says the expression is valid, but the value never shows up. Also need to account for when the metric value is higher than 16, it displays that value. Anybody ever tried doing this?
Thomas Rodrigues's profile image
Thomas Rodrigues

Hi Shaun, I've created this super metric using if/else logic:

Try this:

sum({‌This Resource: ‌hardware|cpuInfo|numCpuCores}) / sum({‌This Resource: ‌cpu|numCpuSockets}) >= 16 ? sum({‌This Resource: ‌hardware|cpuInfo|numCpuCores}) : sum({‌This Resource: ‌cpu|numCpuSockets}) * 16

Shaun Williams's profile image
Broadcom Employee Shaun Williams

Thank you Thomas Rodrigues for steering me in the right direction. Here's what I came up with with your help. I created 2 separate super metrics:

this one is for cores per socket

(sum({This Resource: hardware|cpuInfo|numCpuCores}) / sum({This Resource: cpu|numCpuSockets}) < 16) 
? 16 
: (sum({This Resource: hardware|cpuInfo|numCpuCores}) / sum({This Resource: cpu|numCpuSockets}))

this one is total cores (for when you have more than 1 socket and the cores are still under 16)

(sum({This Resource: hardware|cpuInfo|numCpuCores}) / sum({This Resource: cpu|numCpuSockets}) < 16) 
? (sum({This Resource: cpu|numCpuSockets}) * 16) 
: sum({This Resource: hardware|cpuInfo|numCpuCores})

Once i have access to my lab, I'll attach the super metric json file. This was created in an HOL