VMware Cloud Community
Mauritz84
Contributor
Contributor

Can't find super metric in Host system resource

Hi,

I've created a super metric that shows the amount that could be created on a ESXi host when 1 of 2 hosts in a cluster fails and HA would trigger.

I've followed the guide how to create super metrics (I've created other SMs before) but this time I can't seem to find it in the resource I assign the super metric package. I've even waited for vCOps next data poll.

HA_SuperMetric_3.jpg

I'm running vCOps 5.7.1. As you can see I can test the super metric in the super metric editor when assigning an ESXi host resource:

HA_SuperMetric_1.jpg

I then assigned this super metric to a super metric package. Then I assing the SM package to the ESXi host resource tested in SM editor (Environment > Environment Overview). I even assigned it to Resource kind default (Environment > Configuration > Resource Kind Default).

But I still cant find it when I'm creating my dashboard (Generic Scoreboard Widget). I can't find any super metric at all?

HA_SuperMetric_2.jpg

Question:

Is there a better way to troubleshoot this. Have I configured this incorrectly? Is there something that's not supported in what I'm trying to achieve?

My intention is to do a similar super metric for the other host and later for specific resources like CPU, MEM, DISK.

Regards,

Erik Alm

Message was edited by: Mauritz84

0 Kudos
5 Replies
mark_j
Virtuoso
Virtuoso

Your formulas reference are no good. You're using $R##:M### when you should be using $This:A###.

You always want to go with $This if your just crunching the metrics for the Resource upon which the SM is applied. Also, you'll always want to use $RK if you're apply a SM to multiple resources (such as sumN or avgN).

In your situation, you're using an absolute Resource and an absolute Metric reference, which won't work for you.

Try the recommendation of using $This:A## and get back to us.

If you find this or any other answer useful please mark the answer as correct or helpful.
0 Kudos
Mauritz84
Contributor
Contributor

Hi Mark,

I read about using This resource in the documentation. What I understand this is useful when you want the super metric package to always refer to this resource regardless of which VMs the super metric is going to use.

But What I wanted to do is use the Capacity Remaining metric from 1 ESXi resource and divide it with the total amount of VMs from another ESXi resource. By performing this I would get how many percent of the VMs the unfailed host can hold from the host that failes in a HA scenario.

Take this Cluster for example (Has 2 ESXi Hosts ESXi-05 and ESXi-06). You can see the big difference in how many VMs the ESXi Hosts can hold. There's obviously a big difference in how the capacity is distributed within the Cluster. The super metric I want to create should the do the calculation (See screenshot for reference):

A / B = % of VMs ESXi-06 can hold if ESXi-05 fails --> 6/129 = Aprox. 4,6 %

C / D = % of VMs ESXi-05 can hold if ESXi-06 fails --> 156/15 Aprox. 1040%

SuperMetricCalculation.jpg

I think this would be a powerful number to show to executives or administrators to let them know how badly their ESXi resources are distributed in a Cluster.

It's true that the DRS often will solve the resource distribution. But I've seen examples when our customers ignore that they are beyond the available capacity for a safe HA failure.

But by using This resource I don't understand how this would be achieved? Is there a way to do this with Super Metrics?

Regards,

Erik Alm

0 Kudos
mark_j
Virtuoso
Virtuoso

$This isn't an absolute reference to another resource, it's a reference to the specific resource upon which the SM is getting applied/calculated. If you wanted an absolute metric reference do a $Resource:Metric reference , instead of $ResourceKind:Attribute (which is the relative reference).

So back to the problem you're trying to solve, you want to examine each host, look at how much CPU/Mem is getting used, and pin those two values to each host system resource. Then, you want to evaluate the cluster as a whole, and saying is the highest host consumption 'greater' than the smallest host capacity.. which is what you need to plan for if considering a single host failure. Is that right?

If you find this or any other answer useful please mark the answer as correct or helpful.
0 Kudos
Mauritz84
Contributor
Contributor

You are correct in what I'm trying to achieve. I'm trying to understand how I should do when I combine 1 metric from a specific resource then do a calculation with 1 metric from another resource. I don't understand where this SM Package then should be applied.

Right now I'm just using the metrics "Capacity Remaining | Count | VM" from one "ESXi A" host and divide it with "Summary | Total Number of VMs" from "ESXi B". Basically to get the hang of writing super metrics.

If I did a absolute reference approach without using This (don't know if it matters) I don't know where I should assign the super metric package, on ESXi A or B.

Ex: sum(rtsvl-esx-06.rtsvl.local: Capacity Remaining | Count | VM)/sum(rtsvl-esx-05.rtsvl.local: Summary | Total Number of VMs) - This doesn't work 

If I use $This on both metrics in above examples and then assign it to either ESXi A or B wouldn't this calculate "ESXi A Capacity Reamining / ESXi A Total Number of VMs" and the same if I assign it to ESXi B.

Could it work like this:

sum(This Resource: capacityRemaining|count|vm)/sum(rtsvl-esx-05.rtsvl.local: Summary | Total Number of VMs) - This SM in a SM Package that gets assigned to ESXi-06

Maybe I'm thinking about this the wrong way? As I said I'm trying to learn the possibilities around creating super metrics.

Do you have any links to in-depth super metric creation?

Regards,

Erik Alm

0 Kudos
mark_j
Virtuoso
Virtuoso

Well, the analysis we're doing isn't necessary linked on "quantity of VMs", it's linked to resource consumption of VMs, right? Because who really cares if there are 100 VMs, but they're all idle on a host.. we want to know what load is placed placed on the host... that's how I'd approach it.

So I'd look at the metrics Host System > CPU > CPU Demand (Mhz) and Host System > Mem > Usage (KB). I'm using these #s because they're absolute units instead of percentages, and they're universal measurements.

We've got two metrics to evaluate the cluster resources by in your scenario... CPU and Mem. These can't 'really' be evaluated at the same time using your methods of grabbing highest absolute consumption and seeing if that fits in to the the smallest host at the same time.

What I mean is let's say you have hosts A, B, C:

A: 10Ghz / 64GB capacity, 7Ghz used/ 50GB used

B: 10Ghz / 32GB capacity, 8Ghz used / 30GB used

C: 5Ghz / 64GB capacity, 4Ghz used / 48GB used

Cluster totals:

25Ghz / 160GB capacity, 19Ghz  / 128GB used

How would you want to evaluate this? (ignoring the configuration irregularities/caveats in the host configurations)

There is some SM content out there.. I don't have any external links offhand and usually don't promote one site over another unless it's 'that' good. A quick Google gave some examples.

If you find this or any other answer useful please mark the answer as correct or helpful.
0 Kudos