This is a quick article that came from a customer requirement to demonstrate Super Metric creation. The scenario the customer came up with was to show how many vCPUs were left within a given compute resource based on a defined allocation ratio (we’ll use 4 here). Yes this was a method of showing that allocation information can still be obtained and shown within vROps even though the allocation model does not exist within the 7.0 product version.
Before we dive into Super Metrics it’s import to work out what the maths looks like for getting the number of vCPUs remaining. For this sceanrio the maths is relatively simple:
(Number of Cores x Overcommit Ratio) – Number of Allocated vCPUs
Now I have the basic maths I can look at the Super Metric. The Super Metric will be viewed from a Cluster Compute Resource object and will use metrics that all exist on the Cluster Compute Cluster object so in this instance our formula will use “THIS”. We don’t need to get any metrics from child objects.
The order we assemble the metric in is as follows (also adding a name for the Super Metric as well):
- 1 – Add an opening bracket for our formula
- 2 – Specify “THIS”
- 3 – Select our input object type
Once the input object type is selected our first metric can be double clicked upon.
Now the Super Metric formula is started with this first metric added.
The next step is to add our overcommit ratio. In this example the customer wants the Super Metric to be based on a 1:4 ratio so we multiply our first metric in the formula by 4 and close off our bracket.
The last part of the formula is to then subtract the number of currently allocated vCPUs within the Cluster Compute Resource. The order that we add the this next metric is:
- 1 – Add the subtraction symbol
- 2 – Select “THIS”
- 3 – Select the Cluster Compute Resource input object type
- 4 – Select the “vCPUs Allocated on All VMs” metric
Once the Super Metric has been saved it can be allocated to an Object Type (or types) and then to a policy. Once data collection has run the next collection schedule then the Super Metric will become visible.
Based on a 1:4 ratio then my environment is showing 131 vCPUs are available.