This post was originally published on this site
I came across an interesting query on Reddit regarding vRealize Operations Manager (vROPs), summarised the query;
“Can I have a vROPs report/dashboard which shows me the storage usage by VMs over the past 3 days”
The short answer is yes, and I produced the following dashboard, views and report and uploaded to code.vmware.com for the post author to use.
My dashboard has two elements to keep things simple;
- A sparkline widget of VM’s storage used, the time frame show can be controlled in the dashboard view in the top-right hand corner
- A list view of the VMs storage used covering a few metrics
- Current Disk used
- Disk Used (3 days ago)
- Change of disk used (in GB)
- Change of disk used (in %)
So, let’s look at how I created this.
Creating a Sparkline widget in the Dashboard
Create your dashboard, which will show you a blank canvas. Set the Dashboard name.
- Drag the Sparkline Chart widget onto the canvas and resize as needed, you’ll see this option appear by hovering over the edge of the widget.
- Click the pencil icon to edit the widget settings.
Configure the Widget configuration. The most important options here are;
- Self Provider – On
- Show Object Name – On
- Column Sequence – Label First
This means the widget will provide its own metric data to be displayed. It is not linked to other objects on the dashboard, as we are keeping this as a simple view.
The object name will be show as part of the label, with the label being shown first on the left, Sparkline on the right.
Under the Input Data Tab, select All.
Under Output data, we will select the metric we are interest in. Click the Green + symbol.
In the Add New Metrics pane, set the adapter type to “vCenter Adapter”, and select the Object Type as “Virtual Machine”. On the right-hand side, select under “Disk Space”, the metric “Virtual Machine used (GB)”, and click OK.
You will see the metric added to the output data.
Under Output Filter, I have left this unconfigured in the dashboard you can download from the code.vmware.com website I listed at the start of the blog post. However, as an example, below is showing where I am filtering to show only VMs where disk space used is over 100GB.
For setting the time frame of this widget, you have two options.
- You can let the widget follow the overall time frame of the dashboard.
- You can configure the time frame used by widget regardless of the rest of the dashboard
To see the time setting used for the widget, you can hover of the top right-hand side of the widget pane, this will show you widget control options.
Click the Eye symbol. Then click the Calendar symbol. The first option is dashboard time, which will follow the master time setting, as highlighted by the red arrow.
Alternatively, you can statically set the time range from the options provided, or provide a custom range (purple arrow).
Final point to make on this widget. If you are interested in a particular virtual machine, you can double click on the Sparkline and this will show you more data for that particular object’s metric.
Creating a view which shows the change over a time frame
- Create a new view, and provide a name
- Select “list” for presentation
- Under Subjects, select under vCenter Adapter > Virtual Machine
- Under Data, select Metrics > Disk Space > Virtual Machine Used (GB)
- Drag over to the “data used in view” space
I copied this metric across four times to create the columns needed, I will alter the configuration of each metric to display the data I need.
- Disk Used (Current)
This metric stays the same, showing the current disk usage of the VM. I just altered the metric label.
- Disk Used (3 days ago)
This metric is the same as the above, however I edit the configuration under transformation selecting the “expression option”. For the expression formula I simply choose first.
This configuration will show the metric that has first been recorded in this view. How do we ensure this shows the data from 3 days ago? Or 7 or 14 or 21, or whatever you want? We use Time Settings Tab to control this, which is discussed further on.
- Change (GB)
This metric gives us the change between todays value and the value as of 3 days ago (or whatever time frame you set)
Again, we are doing something similar as above by using the expression formula feature. The math is simple = Current (metric recorded) minus First (metric recorded).
- Change (%)
This last metric will use a slightly more advanced settings and calculations to give us the percentage of change.
I set the sort order to Descending, to show the largest value’s first. This will mean my view will show the VMs with the largest data growth over X days first.
Once again, I use a transformation expression to work out the percentage. Current value minus the First recorded value. Divide the output by the first value and multiple by 100 to give me the change in a percentage.
I then also set some metric colouring. So, if the percentage change is 30% or higher, it will show as red.
- Time Setting
So, the most important bit about this view is the time setting. So that these expressions show you the data growth over X days. It’s simple to do.
Click the Time Settings Tab. Select “Relative Date Range” and the number of days you are interested in.
- Save your view
Finally, you should end up with something that looks like this when pointed at your vSphere World (or other filter source as needed).
The main subject of this post is covering how to use the Transform with Expressions feature against a metric in a view within vROPs, marrying this to the time setting for that view.
Again, you can download all the files discussed to use in your vROPs environment here;
The post How to build vROPs dashboard for tracking VM Growth over X days appeared first on vEducate.co.uk.