Recently I was asked if it is possible to merge two, or generally speaking n different vRealize Operations Dashboards into one Dashboard.
To answer that question and provide a procedure how to do it we need to inspect the internal structure of a vROps Dashboard.
Anatomy of a vRealize Operations Dashboard
As everyone knows vROps content, in this case dashboards, can be exported and imported. Exported dashboard(s) are saved as zip files and after decompressing the zip file the actual dashboard is just a JSON file.
Let’s see how the structure of an empty dashboard looks like. The most important part is the line 26 as displayed in the following picture. Dashboards contain widgets and we see in the line 26 an array of widgets, still empty here as this dashboard does not contain any widget.
Now let’s add some simple and unconfigured widgets without any interactions. This simple dashboard contains two widgets placed into two rows and one column.
And this is the corresponding JSON file. I have collapsed some “unimportant” sections for better visibility.
Since I did not configure the widgets, the “config” sections are empty. Interesting at this point is the “gridsterCoords” section. This section describes the size and the position of a widget on the dashboard. Here another example with some more widgets.
This widgets are described by the following JSON (snippet):
With this information we can describe the coordinates of widgets and place them on a dashboard. A bit unusual is the usage of the “h” and “w” attributes for widgets having their default sizes, maybe someone designed the widgets using a flipped monitor;-)
This unusual usage of width and height seems to be “fixed” and appears as expected if a given widget has been resized during the dashboard creation. But that does not prevent us from merging dashboards.
Merging vRealize Operations Dashboards
Merging dashboards is as easy as copy&paste the appropriate widget sections into the widget array in the target JSON file and adjusting the x and y coordinates accordingly.
In my example we are merging the previous 1×2 dashboard into the 2×3 dashboard and place the 1×2 widgets below the 2×3 widgets. In this example the old widget “names” are still the same, 1-1 and 1-2 to easily identify them on the dashboard.
Widget Interaction
Out of curiosity, let’s inspect an interaction.
The JSON representation of an interaction, multiple interactions are stored in an array, is pretty simple.
With this information and a little bit editing of JSON files it should be possible to merge vRealize Operations Dashboards.
Thomas – https://twitter.com/ThomasKopton