VMware Cloud Community
Gabrie1
Commander
Commander

SuperMetric on vCPUs and host cores

Hi

For practise on how to work in vRealize Operations I wanted to build a dashboard that shows me per cluster, per host if the number of vCPUs on that host doesn't exceed the number of physical cores. We have a policy that a Citrix XenApp or RDP VM, should not share physical CPU Cores with other VMs. In other words, a host with 2 CPUs of 10 cores each, can only run 20 vCPUs.

I also need to make sure that the overcommit doesn't ocure at host level and therefore I would like:

- Select all hosts from clusters that have "CTX" in the cluster name

- List these hosts and show the overcommit ratio which is:  vCPU (sum of all VM vCPUs of specific host) / number of cores of specific host. The result should be <= 1 to be ok and >1 is not OK.

What I did:

- Create a custom FUNCTION group (not sure if that was the best choice) named "Citrix Clusters". Membership of this group are from "Cluster Compute Resource" -> Properties -> Configuration|Name contains "CTX" . When I click preview I see the expected hosts.

- Create a super metric "GVZ Sum VMs vCPU". Content is: sum(${adapterkind=VMWARE, resourcekind=VirtualMachine, attribute=config|hardware|numCpu, depth=1}). But when I click the "Visualize Super Metric" button, the result is always a flat line at value 0.

- I attached the object type "VMWARE / Virtual Machine" and "VMWARE / Host System"

- I attached the policy: "Citrix Hosts Policy", which I created in the Policy Library under "vSphere Solution's Default Policy", I only set the "Override Attributes" for the Super Metric to State = Local.

Then I created a dashboard: "GVZ vCPU vs Cores per Citrix Host".

- Object list that shows the clusters

- Object list that shows the hosts of a cluster when you click on of the clusters.

- Scoreboard that is build when a host is selected.

I created and used this XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<AdapterKinds>

  <AdapterKind adapterKindKey="VMWARE">

  <ResourceKind resourceKindKey="VirtualMachine">

         <Metric attrkey="Super Metric|sm_feeb6609-3771-4e0d-80de-28b89593b64a" label="Sum VMs vCPU" unit="" yellow="63" orange="64" red="65" />

  </ResourceKind>

  </AdapterKind>

</AdapterKinds>

I can see the Super Metic and added it to the bottom list in which you can drag and drop to change order.

But I don't get any scoreboard output.

I must admit that I'm not sure what I'm doing and why, I used a lot of blogs on super metrics but I never got the exact same result. Maybe a super metric is not needed at all.

What I hoped the end-result would be:

- click on a cluster

- get a list of hosts and each row in that list shows hostname, numer of cores in the host, sum of all vCPUs from VMs on that host.

Hope anyone can help.

Gabrie

http://www.GabesVirtualWorld.com
Reply
0 Kudos
5 Replies
aaghabekyan
VMware Employee
VMware Employee

Hi Gabrie,

Supermetric with content: sum(${adapterkind=VMWARE, resource kind=VirtualMachine, attribute=config|hardware|numCpu, depth=1}) (in your case it is "GVZ Sum VMs vCPU") is applicable only for Host System objects. If after visualization the value is 0, it means that attribute=config|hardware|numCpu is 0 (value of Number of virtual CPUs metric) for all children VMs of selected host, please make sure. To get the same result instead of sum(Virtual Machine: Configuration|Hardware|Number of virtual CPUs) I am using sum(Virtual Machine: Configuration|Hardware|Number of CPUs metric in the formula: sum(${adaptertype=VMWARE, objecttype=VirtualMachine, attribute=config|hardware|num_Cpu, depth=1}), please try it and let us know if it resolves the problem related to Supermetric.

Reply
0 Kudos
Gabrie1
Commander
Commander

Hi

Thank you for helping.

I don't fully understand what you're saying. I tried your advice and when I try to change the Super Metric, I can change it into:

sum(${adapterkind=VMWARE, resourcekind=VirtualMachine, metric=config|hardware|num_Cpu, depth=1})

or

sum(${adapterkind=VMWARE, resourcekind=VirtualMachine,attribute=config|hardware|num_Cpu})

Both give me a graph that shows a value of zero.

http://www.GabesVirtualWorld.com
Reply
0 Kudos
aaghabekyan
VMware Employee
VMware Employee

After changing SM formula to sum(${adapterkind=VMWARE, resourcekind=VirtualMachine, metric=config|hardware|num_Cpu, depth=1}),

did you apply it to Host System objects?

Reply
0 Kudos
Gabrie1
Commander
Commander

The super metric was connected to both VMWARE - Virtual Machine and VMWARE - Host System. I have now removed the Virtual Machine option and will check again in an hour.

I have now set it to:  sum(${adapterkind=VMWARE, resourcekind=VirtualMachine, metric=config|hardware|num_Cpu, depth=1}), but I then do get text in red. See screenshot.

Screen Shot 2015-04-15 at 13.44.03.png

http://www.GabesVirtualWorld.com
Reply
0 Kudos
aaghabekyan
VMware Employee
VMware Employee

As I see in the attached screenshot, you have applied SM to IKNCS002 Virtual machine, but there is no sense to apply your SM to VMs, please apply it to Host Systems as I  have applied in the attached screenshot.

Reply
0 Kudos