We can create custom alerts in oem 12c
In this example i will show how to create an alerts if there are any user locks in the DB.
On oem 12c home page
go to
Enterprise > Monitoring > Metric extensions
Create a new metric
Target type: Choose what target this alert is for
In my case DB instance
Give a name
Adapter choose sql as i will be using a query for result
Leave the collection schedule as-is
In this page just give the sql query and hit next
Give a column name by clicking add column and select the o/p in my case o/p is a number
select critical threshold and warning
I chose >0 which means i get alerted immediately if there is a lock
I classified it as fault
Hit next
I used default monitoring credentials
tested with a test instance. Test was successful. Hit next
Click finish
Go to metric extensions page again. You will see the metric you just created
select that and click actions and select save as deployable draft
Once that is done. select the metric and click actions again and choose deploy to targets.
Add the target you want here to get alerted for and click Add
Once thats done. You are ready to go. Goto target page. Click Oracle database> Monitoring> All metrics
Here you will see the locks metric that you just created
Select it and you will see the current real time data.
Once you verify it is there. You need to configure your email alerts in incident rules as below.
Once thats done, Create a test table and update it from two different sessions without commit. You should see your alert email as below :)
In this example i will show how to create an alerts if there are any user locks in the DB.
On oem 12c home page
go to
Enterprise > Monitoring > Metric extensions
Create a new metric
Target type: Choose what target this alert is for
In my case DB instance
Give a name
Adapter choose sql as i will be using a query for result
Leave the collection schedule as-is
In this page just give the sql query and hit next
Give a column name by clicking add column and select the o/p in my case o/p is a number
select critical threshold and warning
I chose >0 which means i get alerted immediately if there is a lock
I classified it as fault
Hit next
I used default monitoring credentials
tested with a test instance. Test was successful. Hit next
Click finish
Go to metric extensions page again. You will see the metric you just created
select that and click actions and select save as deployable draft
Once that is done. select the metric and click actions again and choose deploy to targets.
Add the target you want here to get alerted for and click Add
Once thats done. You are ready to go. Goto target page. Click Oracle database> Monitoring> All metrics
Here you will see the locks metric that you just created
Select it and you will see the current real time data.
Once you verify it is there. You need to configure your email alerts in incident rules as below.
Once thats done, Create a test table and update it from two different sessions without commit. You should see your alert email as below :)