vRealize Operations Manager SuperMetric Fun – Rounding up Attributes and Metric

This week I have been playing with vRealize Operations Manager SuperMetrics.

The super metric is a mathematical formula that contains one or more metrics. It is a custom metric that you design and is useful when you need to track combinations of metrics, either from a single object or from multiple objects. If a single metric cannot tell you what you need to know about the behavior of your environment, you can define a super metric.

After you define it, you assign the super metric to one or more object types. This action calculates the super metric for the objects in that object type and simplifies the metrics display. For example, if you define a super metric that calculates the average CPU usage on all virtual machines, and you assign the super metric to a cluster, the average CPU usage on all virtual machines in that cluster is reported as a super metric for the cluster.

When the super metric attribute is enabled in a policy, you can also collect super metrics from a group of objects associated with a policy.

TASK

This week a client asked for a report that showed the reclaimable RAM but was concerned that as it was going to senior management they didn’t want the ram showing to 2 decimal places but wanted to round out the number.  By default this is not available but this is where our friend the Super Metric comes into its own.

Supermetric I created for this

ceil(sum(${this, attribute=mem|size.recommendation)}/1024576)

To break down

This – this object

Attribute – as this is not a metric but an attribute of an object in this case a VM

Mem|size.recommendation – the recommended RAM to be assigned to the VM

/1024576 to convert from KB to GB

CEIL is the function that rounds the figure, I choose to round up as the client wanted the ram to assign, so a higher figure is better. FLOOR can be used to replace CEIL to round down

RAM rounding SM

Don’t forget once you have created your Supermetric you need to apply it to a object type and enable it in the policy, then it may take 10-15 minutes to appear in the metric tree

Then this was added to new View (please post any questions re Views and I will try to help

View RAM SM

More Details on the Supermetric functions here

http://pubs.vmware.com/vrealizeoperationsmanager-61/index.jsp#com.vmware.vcom.core.doc/GUID-2B08FC9D-4B36-43B7-956B-3EE1E93B02A0.html

vRealize Operations SuperMetric Fun
REQUIRES : VMware 6.1
Ratings
Price:
4 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *