Use Corrective Action ( CA ) to Automate Archivelog Backup When FRA Usage is Over Threshold of Metric Extension ( ME ) in OEM 12C

In Previous posts, we have created below related posts:

  1. Create a Metric Extension (ME) to Monitor FRA Usage on OEM 12C
  2. Create an Incident Rule for Metric Extension ( ME ) to Monitor FRA Used in OEM 12C

Now and then, FRA usage is easily over threshold, DBA needs logon system and manually run a archivelog backup.  It is easily to make database hung if FRA usage is 100%.

Here we use “Corrective Actions” to run a RMAN archivelog backup when the FRA is  used  over warning threshold.

Create a Corrective Action in Library

1)Create a Corrective Action in Library.
go to Enterprise -> Monitoring -> Corrective Actions
Create Library Corrective Action:
OS Command
Click GO

2) Give Name and put something in Description if you like
x1

3) in Parameter section:
Command Type: Single Operation
Command: /home/oracle/ksh/oracle_al_backup_OEM_alert.sh  %SID%

Here %SID% is the variable passed from OEM to the shell script as a parameter.
“oracle_al_backup_OEM_alert.sh” is a shell script:
a: %SID% is the instance name of the database.
b: The shell script also checks whether there are any RMAN backups is undergoing.
c: There are commands to connect to RMAN repository and target database respectively, then commence archivelog backup.

x2

4) Leave “Credentials” and “Access” section as it is for now.

5) Click “Save to Library”.

x3

Add Corrective Action to Metric

1)Go to a target cluster database home page->Cluster Database->Monitoring->Metric and Collection Settings

x4

2) Click “Edit Key-based Metric” on the right for item ” Flash Recovery Area % Used”.

3) Click Edit

x5

4) Click Add for Warning
x6

5) Choose “From Library”, and then “Continue
x7

6) Choose the right corrective action from library, then Continue

x8

7) Complete the General and credentials
x9

8) Click Continue for a couple of times, also check the contents are right.
xa

xb

9) Finally click OK to save the changes

x

10) After a little, a alert is received about “Corrective action status=Succeed”

Corrective action=RMAN_AUTO_BACKUP_ARCHIVELOGS
Corrective action owner=SYSMAN 
Corrective action status=Succeeded 
Corrective action output=SID: RACTEST1
HOME: /u01/app/oracle/product/11.2.0/dbhome_1
BASE: /u01/app/oracle
SID: RACTEST1
HOME: /u01/app/oracle/product/11.2.0/dbhome_1
BASE: /u01/app/oracle

Host=RACTEST1.ractest 
Target type=Cluster Database 
Target name=RACTEST-CLUSTER 
Categories=Capacity 
Message=The value of Flash Recovery Area % Used for +FRA is 82
Severity=Warning 
Event reported time=Dec 22, 2016 9:01:54 PM EST 
Target Lifecycle Status=Development 
Comment=RAC TEST
Operating System=Linux
Platform=x86_64
Associated Incident Id=209879 
Associated Incident Status=New 
Associated Incident Acknowledged By Owner=No 
Associated Incident Priority=High 
Associated Incident Escalation Level=0 
Event Type=Metric Alert 
Event name=ME$RACRecoveryAreaSpace:FRA_PERCENT_USED 
Metric Group=ME$RACRecoveryAreaSpace
Metric=FRA_PERCENT_USED
Metric value=82
Key Value=+FRA
Key Column 1=FRA_NAME
Rule Name=Flash Recovery Area Percent Used for ME

 

Advertisements
This entry was posted in OEM, OEM12c, RMAN Restore and Recovery and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s