So what are Metric Extensions?

As the name implies metric extensions enables us to extend the out-of-the-box monitoring capabilities of Enterprise Manager and customize it according to the requirements of our specific environment.

Very often we may have some monitoring and alerting requirements for which metrics are not available in OEM and we are having  to run external scripts outside OEM.

For example we would like to be alerted and notified via OEM in the following circumstances:

  • Standby database lags behind the Primary database by more than 5 archive log files
  • There are failed DBMS jobs
  • In case some key program units become INVALID
  • In case a very important index becomes unusable or is dropped ….. and so on.

We can achieve all of the above by creating metric extensions in EM 12c.

The  EM 12c Metric Extensions note shows us how to create a metric extension to raise an incident and be notified if one of the critical DBMS_SCHEDULER_JOBS fails for any reason. The metric extension checks for the job status of ‘BROKEN’ to raise a critical event which will then send an email notification to the administrator.

We first create a metric extension as a deployable draft, test it, deploy it to required targets and also publish it. Metric extensions can also be part of a monitoring template.

The note shows the various screen shots of creating and deploying a metric extension in EM 12c.



Note – we can set up email notification for failed DBMS Scheduler Jobs outside of OEM as well using the DBMS_SCHEDULER package.

  DBMS_SCHEDULER.set_scheduler_attribute('email_server', 'mail.soorma.com:25');
  DBMS_SCHEDULER.set_scheduler_attribute('email_sender', 'gavin.soorma@soorma.com');

job_name => ‘TEST_JOB’,
recipients => ‘gavin.soorma@soorma.com’,
sender => ‘gavin.soorma@soorma.com’,
subject => ‘Scheduler Job Notification-%job_owner%.%job_name%-%event_type%’,
body => ‘%event_type% occurred at %event_timestamp%. %error_message%’,
events => ‘JOB_FAILED, JOB_BROKEN’);

This is an example of the email alert we will be sent:

JOB_FAILED occurred at 05-JAN-15 PM +08:00. ORA-01653: unable to extend table SYSTEM.MYOBJECTS by 128 in tablespace GAVIN
ORA-06512: at line 3


Please follow and like us:

Last Update: June 23, 2020  

January 13, 2015 245 Gavin Soorma
Total 0 Votes:

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?

, , , , , ,

Leave a Comment

Your email address will not be published. Required fields are marked *


Social media & sharing icons powered by UltimatelySocial
Back To Top

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?