By: Gary Monk
I was recently working with a customer using the Oracle Database Management Pack from Blue Medora, who was interested in creating an alert that shows the percentage of free space in a tablespace. Through the Blue Medora Oracle Database Management Pack, you can gather two important metrics – total amount of space for instance and the amount of free space in the tablespace – which enables us to compute the percentage of free space in the tablespace by creating a super metric.
In this blog post, I’ll provide an overview of how to create a super metric and associate the super metric to an object.
To Create a Super Metric
- Navigate to content > super metric
- Click on the green plus sign to bring up the manage super metric window
- Give the super metric a name. In my case, I called it “Tablespace % Free”
- Select the Oracle DB Adapter in the object type window
- Select the Oracle DB tablespace object
- In the bottom, left hand corner is the list of available metric groups. Expand the general group to see which metrics are available for the tablespace object
- As you can see, there is no percent of free space listed, but there is the allocated size and free space in number of bytes. We will use these two metrics to compute the percent of free space.
- In the text area outlined in red, enter a left parenthesis. It is important to note that there are numerous built-in functions and operators. To select either one, click on the down arrow alongside the appropriate drop-down box.
- Click on the “this” button. This means that the formula will apply to the currently selected instance of the object.
- Next double click on the free space (bytes) metric in the lower left of the window.
- You can either enter a “/” or select it from the operators dropdown.
- Click on the “this” button again.
- Double click on the allocated size (bytes) metric.
- Enter a right parenthesis
- Multiply the result by 100 to get a percent. You do this by entering an “*” or select it from the operators dropdown
- Enter the value 100 after the multiplication symbol.
- After clicking on the save button the definition for the super metric is complete.
- If instead, you wanted the percent of tablespace used you could subtract the percent of free space from 100 to derive that metric. The formula would be:
- 100 – ((${this, metric=general|FREE_SPACE} / ${this, metric=general|TABLESPACE_SIZE}) * 100)
After you create the super metric, you must associate it with an object. In this case, the object would be the Oracle DB tablespace object. To do this, select your newly created super metric and perform the following steps.
To associate the super metric with an object:
- Click on the object tab in the bottom part of the screen.
- Click on the green plus sign. The select object type windows will appear.
- Select the Oracle DB adapter and under the adapter select the Oracle DB tablespace object.
- Click on the select button and that will associate the correct object type to the super metric.
The last thing that you need to do before you can use the super metric is to add it to a policy. That will be the subject of a future blog.
As you can see the ability to create super metrics is a very powerful feature of vRealize Operations. Super metrics can be used to determine alerts, or can be used as metrics on a dashboard. You can also select a super metric as a KPI. By doing so, the super metric will automatically show where ever the standard KPIs are shown of the selected object.
Additional References
- Supercharge your vRealize Operations with super metrics
- How to create a super metric in vRealize Operations 6