By: Greg Hohertz
Have you ever wanted to monitor the percentage of something, but been stuck with just the raw measurements? This is where vRealize Operations super metrics come into play. Super metrics are a mathematical formula in vRealize Operations which contain one or more numerical values. They can be used to calculate averages, percentages, sums, min and max, among others. In this blog, we’ll take a look at how we can create a percentage value using a super metric.
For this example, we have an Oracle DB tablespace resource from the Blue Medora Management Pack for Oracle DBs. The metrics provided show the allocated tablespace as well as the free space.
Figure 1: Existing metrics for the Oracle DB tablespace resource
The first step to create a super metric is to create the super metric formula. To accomplish this you will:
- Login as an vRealize Operations user with sufficient privileges to create super metrics
- Navigate to Content > Super Metrics (see Figure 2)
- Click on the “Add New Super Metric” button (the green plus sign)
Figure 2: Navigating to Content > Super Metrics
- In the middle-right pane, select the adapter type, “Oracle DB Adapter”
- Left click on the Object Type from which you’d like to create the super metric, “Oracle DB Tablespace” (Figure 3)
Figure 3: Selecting the Adapter Type and Object Type
- Next, we’ll build our formula. Click on the “This” button on the toolbar. This tells the formula that we’re working with the object itself
- Double click on Free Space
- Now, let’s apply our mathematical operator. For this, we’ll use “/” to divide
- Click on the “This” button again
- Double click on Allocated Space
- Next, let’s convert this from decimal to a percentage. Enter “*” to multiply, then type “100” (Figure 4)
- Give this Super Metric a friendly name in the top right
- Click on Save
Figure 4: Creating the super metric formula
Now that we have a super metric, we need to associate it with an object, so that the metric is tracked alongside other metrics for that object.
- Navigate to Content > Super Metrics
- Left click on your newly created super metric
- In the bottom pane, select the Object Type tab
- Click on the add button
- Select the “Oracle DB Tablespace” object, since we want this percentage free to show up on that resource
- Click Select (Figure 5)
Figure 5: Associating the super metric with the object
The last step is to enable the creation this Super Metric in our policy. Find the policy which your Oracle Databases are in (often times this will be the default policy). Then, we’ll enable the super metric by doing the following:
- Navigate to Administration > Policies
- Click on the Policy Library tab
- Select the policy which the Oracle DBs are using
- Click on the edit button
- Select “Collect Metrics and Properties” in the accordion menu on the left
- In the Object Type dropdown, select “Oracle DB Tablespace”
- Filter for Super Metrics by selecting the Attribute Type menu, deselect Metric and Property
- In the “State” column, change the value from Inherited to Local
- Click Save (Figure 6)
Figure 6: Enabling the super metric in our policy
And there you have it! Creating a percentage super metric with vRealize Operations can be quite simple, and transform how you’re monitoring. For more information on super metrics, check out some of our other recent blog posts: