Creating Dasboards using Script

Recently I had a requirement from customer to create a dashboard which had a lot of manipulations with regards to values collected.

Here is a synopsis of the requirements,

The customer had 8 LOBs, one of them hosts all the management VMs like VRA machines vrops AD etc. there are total of 6 cluster shared by every LOB.

Now the customer wants to have a report for each LOB, what is RAM used by all vms in LOB, how many vCPUs are assigned how much storage is used by each LOB.

Once that is done the resources used by the management LOB needs to be divided between remaining LOBs.


The division must happen based of the percentage of VMs the LOB has in the environment.


For example : If LOB1 has 200 VMs out of total 1000 VMs in the environment it becomes 20 %, Now if the management Vms are 10 % of total which is hundred VMs, 20 % of 100 Vms will should be added to LOB1.

That is 20 VMs will be added to 200 vms of LOB1. Now the total becomes 22% for LOB1.

The same thing needs to be done for three conditions, one for VMs, once for Cores and once for storage.

Following is how customer wanted the output to look.


Solution 1 :-

The first thing that I thought of was creating super metrics, but the problem with supermetrics was that the number of supermetrics for first phase itself went over 45. Each supermetric was interdependent.

The second problem with this was I was not able display the output in the format that the customer wanted as views in vROPs have a very limited display option.

Solution 2 :-

To avoid the complexity of the super metrics, following system was devised


Create a report with raw data of virtual machines including LOB names cluster names and other resources.

Export the csv to a windows machine.

Create a custom script to do the calculation and create a HTML file and CSV file with required output.

Export the HTML and csv file to vROPs.

In vrops create a dashboard to import the HTML file.

You will need EPOPS agent to schedule the script.

For copying the HTML pages vROPs I used the tool pscp.exe, it is a scp tool from putty.

Following is the  output using the system






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s