vCOps 5.x was a great product for Administrators but, vROps is just amazing. vCOps was really good and stable, let you customize many informations and screens, but vROps gave its users the ability to define easily reports, supermetrics (was possible in previous release but so difficult :)), XML files (was possible as well but not integrated in the UI). This list is really limited considering the numerous new features of vROps 6.0.
In this article, I want to focus on XML files in vROps. As written previously, this possibility was already offered in vCOps 5.x but was not easily accessible to administrators that don’t want to invest many time in customizing vROps and vCOps.
This article is applicable to vCOps 5.x and vROps 6.x but all the screens are taken from vROps 6.0. Also, some metrics shown may not be available in vCOps 5.x.
1. Why this article ?
Recently, I had different workshop with some of my customer, as they want to be able to do their capacity planning.
During these workshops, we had to define how to create these capcity planning, how to leverage its possibilities. One thing that appeared rapidly was that it was necessary to prepare the field so as to be able to configure rapidly the dashboards. This function is assumed by XML files. Previously inaccessible through the UI (as far as I know), you can now configure that under “Content/Manage Metric Config”.
2. First steps
The very first step is to understand how this file is built. It really deserve it, as, depending on the widget, it will be required to set it up accordingly. We will also describe few other term, that will be helpful.
2.1. Dashboards, Widgets
2.2. The metrics
Depending on the object type that will be monitored, different metrics are available. For “Clusters”, the “CPU Usage”, the “Memory Usage Average”, … metrics are available.
For “VMs”, the “CPU Ready Percent, the “Memory Latency Average”, … metrics are available.
There is also some “Calculated metrics”. As their name let suppose, these metrics are calculated by vROps throughout its collections of datas and they let you have more informations on your infrastructure.
As my goal is not to list them all, I would highly recommend to have a look at the official documentation through this link.
2.3 – The properties of the metrics
The second thing to know is that you can define properties associated with these metrics. These properties can for example be threshold to change the color of an item in a widget. The properties that can defined depends on the metrics itself. For example, “badge | waste” handles 4 colors (Yellow, Orange, Red and Blue). You can define at which level you want to change the coloring state to alert visually the user.
By experience, these colours in a scoreboard are really helpful to help highlighting potential problems.
3. Let’s go !
3.1. Defining the target
What’s our goal ? It’s to build “automatically” this Scoreboard
How to describe it ?
- Type of Widget is “Scoreboard”
- This Scoreboard is applied to an object of type “VirtualMachine”
- 5 metrics are displayed :
- Number of vCPU
- Observed Workload
- Calculated Health
- Calculated Risk
- Estimated waste
3.2. Build the XML
You may assume it’s a bit late to start writing the file but, what I learnt with vROps is “if you planned it correctly, you won’t loose time”. So, let’s start.
Each XML file start with the same line and finishes with the closing :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AdapterKinds> <AdapterKind adapterKindKey="VMWARE"> </AdapterKind> </AdapterKinds>
Next step is to tell vROps what kind of object will be eligible to this XML file. This is told to vROps through the attribute “ResourceKindKey” in the “ResourceKind” tag :
- For Virtual Machine, ResourceKindKey is “VirtualMachine”
- For Cluster, ResourceKindKey is “ClusterComputeResource”
- For vCenter, ResourceKindKey is “VMwareAdapter Instance” (hum, don’t ask why please ?!)
When the relevant resource is defined, the XML file could be completed.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AdapterKinds> <AdapterKind adapterKindKey="VMWARE"> <ResourceKind resourceKindKey="VirtualMachine"> </ResourceKind> </AdapterKind> </AdapterKinds>
Final step is to add the different metrics. In the previous case, these are the attributes that should used :
- To display the number of vCPUs, Attribute is “config|hardware|num_Cpu”
- Label used here is “Nb of vCPU” (by the way, you may want to input anything
- unit used here is “vCPU(s)” (the very same note is applicable : input whatever make you feel good :))
- threshold are used (yellow is for 2 vCPU and above, orange for 4+ and red for 8+)
- To display workload, Attribute is “badge|workload”
- Customer parameters are used as well. Refer to vCPU to customize the displayed information, …
- To display the Calculated Health, Attribute is “badge|health”
- To display the Calculated Risk, Attribute is “badge|risk”
- To display the Calculated Waste, Attribute is “badge|waste” (this one is my preferred, customer are usually surprised on how their VMs are OVERsized :))
After this attributes are defined, the XML can be completed.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Used for Operations & Monitoring purposes --> <!-- Applies to Widget type "Scoreboard" --> <AdapterKinds> <AdapterKind adapterKindKey="VMWARE"> <ResourceKind resourceKindKey="VirtualMachine"> <Metric attrkey="config|hardware|num_Cpu" label="Nb of vCPU" unit="vCPU(s)" yellow="2.0" orange="4.0" red="8.0"/> <Metric attrkey="badge|workload" label="Workload" unit="%" yellow="35.0" orange="55.0" red="75.0"/> <Metric attrkey="badge|health" label="Health" unit="" yellow="75.0" orange="50.0" red="35.0"/> <Metric attrkey="badge|risk" label="Risk" unit="" yellow="25.0" orange="50.0" red="65.0"/> <Metric attrkey="badge|waste" label="Waste" unit="" yellow="20.0" orange="40.0" red="60.0"/> </ResourceKind> </AdapterKind> </AdapterKinds>
I usually place comments in the files as, I won’t touch them quite often and really appreciate to avoid loosing time on understanding what I previously did.
You just have to save this file and create a dashboard that will be able to use this XML file.
Just to give an example :
Hope this help to understand how these files are built and, mostly, how vROps can be really helpful in the IT day2day life, from Operations to Capacity and beyond.
6,981 total views, 14 views today