IT Operations Management (ITOM)
Showing results for 
Search instead for 
Do you mean 

3 steps to new metric collection with OMi MP for Oracle Database

Manoj_Mohanan ‎03-20-2014 09:30 AM - edited ‎01-25-2015 09:48 AM

The monitoring needs of enterprises differ and each requires a specific set of monitoring to meet their needs. A single solution may cover most of the use cases for an enterprise, but there still may be few which are not covered with an out of the box solution. That’s exactly the reason why practitioners search for ways to extend the monitoring capabilities of any given solution.


Extensibility is a desired feature in a monitoring solution and “OMi Management Pack for Oracle Database” provides practitioners with the provision to extend its monitoring capabilities by adding User Defined Metrics. In this blog, I explore this feature of the management pack.


You can download the OMi Management Pack for Oracle Database to experience this monitoring capability for yourself.


What do we need to define our own metrics?

  1. We need to identify the metric we want to monitor
  2. We need a mechanism to collect the data
  3. We need a mechanism to alert when its value crosses a threshold

 We can achieve all of the above in three easy steps:




Step 1: Identify and Define User-Defined Metric

Step 2. Configure parameters

Step 3. Deploy monitoring


Let us look at the steps one by one in detail.


Step 1: Defining User-Defined Metrics

So here I am going with the assumption that we are aware of the “What” part i.e. we have already identified the Oracle Database metrics we want to monitor.


OMi Management Pack for Oracle Database” provides pre-defined policy templates to help define one’s own metrics (aka User Defined Metrics). These policy templates are part of User Defined Aspects (UDA). Below are the steps you need to follow to define a UDM.


1. Edit the Oracle Aspect “Oracle UDA

2. Click the Policy Templates tab and edit the “OracleDB_UDM” policy template
3. Click the Policy Data tab. It contains sample example of a user defined metric. Edit the section as required. The version number of the Sample UDM policy is incremented by 1 


For example below is a SQL code snippet that will count the number of “blocked sessions”. This code snippet can be added to the policy data section of the policy template. 

--------------------------------CODE SNIPPET-----------------------------------------------



            METRIC 0702

                      COLLECT MW ITO "


                                                    sql1_val number;


                                                   :dbspi_error := '<no error>';

                                                   select count(*) into sql1_val from v$session

                                                                          where blocking_session is not null;

                                                   :dbspi_value := sql1_val;


                                                    when OTHERS then :dbspi_value := -1 ;




Things to know about the above code:

dbspi_value -> pre-defined variable to store the value of the metric. It is mandatory to store the value of the metric we intend to query in this variable


METRIC 0702 -> Identifies a section to define metric. In this case metric number 0702


We have now defined the metric. The “OMi Management Pack for Oracle Database” will start collecting the data when the policy templates are deployed to the appropriate Oracle Database Instance.


Step 2: Configure parameters

Having defined the metric, we need a mechanism to generate alert when the metric value crosses a defined threshold. We achieve this by updating a predefined policy template. We will also parameterize the configurable fields like threshold using this template.


Parameters are key to a simplified configuration as it allows for configuration of the values at run time during deployment. “OMi Management Pack for Oracle Database” provides a sample policy template that can be reused to achieve this as mentioned below:


1. Navigate to “Admin > Operations Management > Monitoring > Policy Templates” and select the policy OracleDB_07XX. The policy will be listed under “Measurement Threshold Templates” 

2. Right click; select copy item and then paste the item. This will create a copy of the policy.
3. Rename the policy appropriately. In this case rename it to OracleDB_0702.


4. Edit this policy in raw mode. Change the “Message Text” and other fields as required

5. Select Policy Parameters tab and edit the parameters as required. For example, to modify the UDM frequency, you can select the parameters UDM frequency and edit it. The Edit Parameter window opens. You can modify the default values and then click OK. The version of the policy template OracleDB_0702 increments by 1. The parameter UDM frequency identifies the frequency at which the metric will be collected.



Step 3. Deploy monitoring

Having created the UDM and the configured the required parameters, the final step is to deploy the created policies.


1. Navigate to Admin > Operations Management > Monitoring > Policy Templates and select the following templates and assign it to appropriate node.


2. Fill in the values of the parameters as required before finishing the assignment.


This will deploy the UDM templates to node. The OMi Management Pack for Oracle Database will start collecting this new metric from the next schedule.



So if you are aware of the metric that you want to collect then it is just 3 simple steps to extend the OMi Management Pack for Oracle Database’s capability to monitor your metric.


To learn more, visit the OMi Management Pack page.


Download the OMi Management Pack for Oracle Database here to experience this monitoring capability for yourself.


Other References:

HP OMi now includes Automation to simplify IT Monitoring

Do you Hadoop? Very Vertica? Overly ORACLE ? Incredibly Infrastructure? Let HP OMi help out

OMi Management Pack for Vertica - Part 1: The Need

Demystifying Oracle Database Monitoring with Omi Management Pack for Oracle Database

The New Deal: Monitoring Microsoft SQL Server with OMi Management Pack


About the Author


Manoj Mohanan is a Software Engineer working in the HP OMi Management Packs team. Apart being a developer he also dons the role of an enabler, working with HP Software pre-sales and support teams providing technical assistance with OMi Management Packs. He has experience of more than 8 years in this product line.

Nov 29 - Dec 1
Discover 2016 London
Learn how to thrive in a world of digital transformation at our biggest event of the year, Discover 2016 London, November 29 - December 1.
Read more
Each Month in 2016
Software Expert Days - 2016
Join us online to talk directly with our Software experts during online Expert Days. Find information here about past, current, and upcoming Expert Da...
Read more
View all