vROPS 6.7+ – How to use Expressions to make metrics more useful

The Expression feature that is located in the View Widget will allow you to create a simple formula using the metric you have chosen. This is an excellent feature as it will allow us to make a metric a lot more useful and accurate. It also allows us to avoid writing super metrics in most cases. In this example, I will take the metric VM OS Uptime which displays in seconds by default and convert it to days using the expression transformation. This feature is only available using the view widget.

  1. Let’s create a new View by going to Dashboards > Views > + sign

  2. Provide a name for the view

  3. Select the List option under Presentation, since we want to see a list of VMs

  4. Select Virtual Machine as our Subjects

  5. Double click on System > OS Uptime to see the total uptime of a VM. In the example below, notice how the preview shows OS Uptime in seconds. These numbers are not useful at all.

  6. We are going to create an expression to convert from seconds to days. Under transformation, change the transformation from Current to Expression. This allows us to now create a formula for our selected metric.

  7. One day has 86,400 seconds (I googled this). Therefore I write a formula to show current value divided by 86,400 to show the results in Days.

  8. I refreshed my preview and now voila. I get uptime in Days. Make sure you change your metric label to reflect this. See how I wrote “Uptime in Days”

  9. This view can now be added to a report or dashboard