Metric Extensions

Why use a Metric Extension?

The Metric Extension is the evolution of the User Defined Metric. Regular UDMs can be used to gather and store data from targets. Repository-side Metric Extensions let you define new metrics/alerts based on information that is in the EM SYSMAN repository schema.

Creating a Metric Extension
In this example we will create a Metric Extension for Data Guard Lag time. This will be measured at the STANDBY instance and will use CURRENT_SCN timestamp vs the database's systimestamp in order to find out exactly how far behind redo application is at the point where the metric is executed.

Go to Enterprise - Monitoring - Metric Extensions menu.
Select Create - Metric Extension

Verifying Metric Extensions

-- List configured targets for the Metric Extensions
SELECT * 
FROM sysman.gc_metric_columns_target 
WHERE metric_group_name='ME$DG_LAG_TIME' 
ORDER BY ENTITY_NAME;

Getting current data for our Metric Extension

-- View successfully collected data, all columns
SELECT * 
FROM SYSMAN.MGMT$METRIC_CURRENT 
WHERE METRIC_NAME='ME$DG_LAG_TIME';

-- View successfully collected data, prettified
SELECT TARGET_NAME, METRIC_NAME, METRIC_COLUMN, COLLECTION_TIMESTAMP, VALUE
FROM SYSMAN.MGMT$METRIC_CURRENT 
WHERE METRIC_NAME='ME$DG_LAG_TIME';