Thursday, March 13, 2014

Part 2 - Behind the Scenes - vCOps One Click Cluster Capacity Dashboard!

As promised in my last post "Part 1 - Creating One-Click Cluster Capacity Dashboard Using vCOps!", I am going to share the recipe for preparing dashboards similar to "One Click Cluster Capacity Dashboard" which received a lot of appreciation from the Twitterati. Their were a number of people who deployed the dashboard and within minutes they could showcase the capacity of their vSphere Clusters. 

Now I want to take this one level deeper and tell you how you can create your own cool XMLs within vCOps Custom UI (included with Advanced & Enterprise Edition) to create the dashboard which you want to showcase to your CxO, IT VP or the NOC team who are monitoring the virtual infrastructure. In simpler terms I will call it the BEHIND THE SCENES post which will get into XML coding. It's way easier than I thought so go ahead, read on....

To begin with let's have a look at the XML file which I created for Scoreboard interactions in Part 1 of this 2 post series. Here is how the file is structured and the details of the components which make up this file. Understanding this is CRITICAL...


Now if you have spent some time reading the details of the image above, the first question you will have is that from where can I find the adapterkindKey, resourcekindKey & the Metric attrkey to make my DREAM DASHBOARD.

Honestly, if this is not the question which you have in your mind, then you need to re-open that image and go through the structure AGAIN & AGAIN. You would not need to as it is very simple, but I am just making sure that we are on the same page before we move forward.

Let's see from where can we get the above parameters which can help us make our own XML.

adapterkindKey - This is the easiest one. Mostly you will be using VMWARE as the adapter kind if you want to see metrics from your vSphere Environment. If you have collectors installed for 3rd party products then refer to their documentation for the adapter name. 

resourcekindKey & attrkey - To get this data you need to access the database of vCOps which has stored these keys. The procedure has been defined in VMware KB - 2011714.

Let me simplify it for you further. You need to follow the steps below.

1- Open the following URL in your environment - 

https://<ip address of UI VM>/vcops-custom/dbAccessQuery.action

2- Once you see the vCOps DB Access Query page, you need to run the following query. This will fetch the data we are looking for. Ignore the *** You need to copy and paste the query from SELECT and end at 'HostSystem'

from AdapterKind a
 inner join ResourceKind b on (b.ADAPTER_KIND_ID = a.ADAPTER_KIND_ID)
 inner join AliveResource c on (c.RESKND_ID = b.RESKND_ID)
 inner join ResourceAttributeKey d on (d.RESOURCE_ID = c.RESOURCE_ID)
 inner join AttributeKey e on (e.ATTRKEY_ID = d.ATTRKEY_ID)

 where a.ADAPTER_KEY = 'VMWARE' or b.RESKND_KEY = 'HostSystem'


You would need to change the values highlighted in blue in the query if you are looking for keys related to an adapter other than VMware.

3- The query will give you all the data which you were looking for in the following format. (Screenshot from my lab)

Here, you will see the resourcekindKey & attrkey which will help you to create your own XML for the values which you want to showcase for a particular resource. Once you have done that, you just need to import this XML into the default interactions location mentioned in my last post and you will be ready to use it for Score Board interactions.


Well, I hope you will use this recipe to good and I would appreciate if you can share the XMLs which you create with this recipe as I am planning to have a repository on my blog with some dashabords which are easily re-usable and can help the VMware Community using or planning to use the vCenter Operations Manager. As always, share your thoughts/ideas in the comments section.

PS: Please VOTE for vBLOG 2014 Contest.  We (vCommunity Bloggers) need your support to keep us going and continue delivering the quality content to you. 

Share & Spread the Knowledge!!

No comments:

Post a Comment