With vRealize Operations Manager you can create a metric configuration file; this is an XML file that contains pre-defined metrics that can be used in different widgets. With the XML file you can skip the process to manually pick the required metrics and attributes over and over again. Another advantage is that you can reuse this XML file in different widgets for different objects in your environment.

By default vRealize Operations Manager comes with a few sample files that show you how the file is formatted:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AdapterKinds> <AdapterKind adapterKindKey="aaa"> <ResourceKind resourceKindKey="wwddd"> <Metric attrkey="fdfdf" /> <Metric attrkey="eeeddd" /> <Metric attrkey="tthhh" /> </ResourceKind> </AdapterKind> </AdapterKinds>

In vRops 6.0 (and also 5.x) you had to upload XML files to a particular folder on your vRops server (/usr/lib/vmware-vcops/tomcat-web-app/webapps/vcops-web-ent/web-inf/classes/resources/reskndmetric), since a 6.1 you can add/edit/delete XML files straight from the webbased interface. Choose content->Manage Metric Config ->ReskndMetric for this.

For now let’s have a closer look at the XML file. Three things are important here:

The <AdapterKind adapterKindKey=”aaa”> tag determines which adapter is required for the metrics you want to include; The <ResourceKind resourceKindKey=”wwddd”> tag determines the resource type, e.g. cluster, datastore, virtual machines, host; The <Metric attrkey=”fdfdf” /> tag determines which attributes and/or metric are included in the configuration.

The question for now is, how to build a valid configuration? We can use the super metrics interface for this. Let’s say we want to build an XML which includes important virtual machine parameters such as CPU Demand, CPU Usage, CPU Contention, Memory Demand, Memory Usage and Memory Contention. Open the super metrics interface, select:

Adapter type = vCenter Adapter

Object type = Virtual Machine

Metric = CPU Demand (%)

The super metric interface will you provide you with the required values:

What we need here is:

${adaptertype=VMWARE, objecttype=VirtualMachine, metric=cpu|demandPct, depth=1}

The values for adapter type, objecttype and metric can all be included in the XML virtual machine configuration file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AdapterKinds> <AdapterKind adapterKindKey="VMWARE"> <ResourceKind resourceKindKey="VirtualMachine"> <Metric attrkey="cpu|demandPct" /> </ResourceKind> </AdapterKind> </AdapterKinds>

Also add the other metrics; at the end the XML file will look like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AdapterKinds> <AdapterKind adapterKindKey="VMWARE"> <ResourceKind resourceKindKey="VirtualMachine"> <Metric attrkey="cpu|demandPct" /> <Metric attrkey="cpu|usage_average" /> <Metric attrkey="cpu|capacity_contentionPct" /> <Metric attrkey="mem|usage_average" /> <Metric attrkey="mem|host_contentionPct" /> </ResourceKind> </AdapterKind> </AdapterKinds>

Although this XML file now selects the metrics for our dashboard, we might want to add some extra information: a label, the unit and the yellow, orange and red thresholds. Actually this quite simple, by using the designated properties. Adding this information will result in the following XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AdapterKinds> <AdapterKind adapterKindKey="VMWARE"> <ResourceKind resourceKindKey="VirtualMachine"> <Metric attrkey="cpu|demandPct" label="CPU Demand" unit="%" yellow="50" orange="70" red="85" /> <Metric attrkey="cpu|usage_average" label="CPU Usage" unit="%" yellow="50" orange="70" red="85" /> <Metric attrkey="cpu|capacity_contentionPct" label="CPU Contention" unit="%" yellow="50" orange="70" red="85" /> <Metric attrkey="mem|usage_average" label="Memory Usage" unit="%" yellow="50" orange="70" red="85" /> <Metric attrkey="mem|host_contentionPct" label="Memory Contention" unit="%" yellow="50" orange="70" red="85" /> </ResourceKind> </AdapterKind> </AdapterKinds>

No we can use the XML file in the scoreboard widget or metric chart. Create a new dashboard and drag the widget to the canvas. Open the widget, and choose select the correct XML file in the Metric Configuration pull down box:

This widget will now use the counters defined in the XML. You can for example add an object list to the dashboard, and configure interaction between the object list and widget that’s using the XML file.

Take a look at the following dashboard which contains and object list, workload widget, relationship widget, scoreboard widget and the metric chart widget. The scoreboard- and metric chart widget both use an XML file for the configuration of the metrics:

I hope this was helpful. You can leave your comments below!