Oracle DBA – A lifelong learning experience

Posts Tagged ‘udm’

How to add a metric extension and use a ‘control’ table to test results

Posted by John Hallas on November 27, 2017

I have previously blogged about creating a User Defined Metric (UDM) before  (7 years ago!)  but the method I am using today demonstrates how you can test out the alert using specific data.

The aim was to see if integration data is flowing through a table.  If there is a backlog we want to know about it.

Simon Ryan, a colleague did all the preparatory work and created all the 18 !! screen shots which I had to copy and paste into this entry

select * from sm7.EVENTOUTM1; -- Transient table so data not usually present.

The data is processed quickly but occasionally you can see a handful of rows for a few seconds.

 (BLOB) email 08-NOV-2017 11:40:01 0000000005254328

A typical query for the ME would be very simple:

select count(*) from sm7.EVENTOUTM1;

However, we are going to plugin a ‘control’ table in order for us to test the alert by artificially adjusting the results. Read the rest of this entry »


Posted in Oracle | Tagged: , , , | Leave a Comment »

How to create a User Defined metric(UDM) in Grid

Posted by John Hallas on December 8, 2010

Using Grid it is possible to create user defined metrics that capture information about the state of a database, a host or an application. Once you have a script or sql statement that returns a value then a UDM can be created. Within EM a report can be created to report the metrics or an alert can be raised.

Firstly I will create a UDM that reports when an account is locked and automatically raise an alert. It may be a simple example but I show one or two issues that can occur.

EM/Select the database/User defined Metrics at the bottom of the main page. Create a new UDM and I suggest starting the name off with a business area such as Retail or EBS as you can end up with quite a few metrics once you get the hang of them.

The key choice to make is whether the output will be a number or a string and whether or not you want one or two values output. In my case I want to know the status of an account so that will be string and I want to output two columns, the username and the status. Enter your query and an account to use for the connection. Ensure that the query works and the account has the privilege to run that query. In this case when  I tested the UDM it fails as I had not  created the accounts beforehand. Select a comparison operator (equal, less than MATCH etc) to the sql query you are running and then format the output you want in the alert.

Note the %Key% and the %value% keywords have to be in exactly that case.

Set the test time to be 5 minutes in the schedule team for the purposes of testing it out and then run the test command (or save if fully confident). Remember to reschedule later. Note 5 minutes is the lowest frequency you can use. Read the rest of this entry »

Posted in Grid control and agents, Oracle | Tagged: , , , | 7 Comments »