The email alerts generated from Oracle Enterprise Manager Cloud Control are not the most appealing visually, with formatting not easy on the eyes and includes a slew of unnecessary information and clutter.

To customize email notification in OEM Cloud Control 12c/13c, login as SYSMAN and navigate to Setup > Notifications > E-Mail Customizations. Below is a screenshot of what this page may look like:

Here is how the default notification for a Metric Alert looks like:

As you can see, the information is all there, but it is just not visually appealing. Unfortunately, HTML formatting is not allowed so the options for customization are limited.

Here is the default (i.e., awful) email template for Metric Alerts:

-- Enterprise Manager default template

-- if the email is for the status of corrective action
-- show the details of the execution of the corrective action
[IF NOTIF_TYPE EQ "NOTIF_CA"]
    [CA_JOB_NAME_LABEL]=[CA_JOB_NAME]
    [CA_JOB_OWNER_LABEL]=[CA_JOB_OWNER]
    [CA_JOB_STATUS_LABEL]=[CA_JOB_STATUS]
    [CA_JOB_STEP_OUTPUT_LABEL]=[CA_JOB_STEP_OUTPUT]
[ENDIF]

-- Source object name is the entity raising the issue.
[IF SOURCE_OBJ_NAME NOT NULL]
    [SOURCE_OBJ_TYPE] [NAME_LABEL]=[SOURCE_OBJ_NAME]
    [SOURCE_OBJ_TYPE] [OWNER_LABEL]=[SOURCE_OBJ_OWNER]
[ENDIF]
[IF SOURCE_OBJ_SUB_TYPE NOT NULL]
    [SOURCE_OBJ_TYPE] [TYPE_LABEL]=[SOURCE_OBJ_SUB_TYPE]
[ENDIF]
[IF HOST_NAME NOT NULL]
    [HOST_NAME_LABEL]=[HOST_NAME]
[ENDIF]
-- Target name links to the respective target home page 
-- in Enterprise Manager console
[IF TARGET_NAME NOT NULL]
    [TARGET_TYPE_LABEL]=[TARGET_TYPE]
    [TARGET_NAME_LABEL]=[TARGET_NAME]
[ENDIF]
[IF CATEGORIES NOT NULL]
    [CATEGORIES_LABEL]=[CATEGORIES]
[ENDIF]
[MESSAGE_LABEL]=[MESSAGE]
[IF ACTION_MSG NOT NULL]
    [ACTION_MSG_LABEL]=[ACTION_MSG]
[ENDIF]
[SEVERITY_LABEL]=[SEVERITY]
[EVENT_REPORTED_TIME_LABEL]=[EVENT_REPORTED_TIME]

[IF TARGET_LIFECYCLE_STATUS NOT NULL]
    [TARGET_LIFECYCLE_STATUS_LABEL]=[TARGET_LIFECYCLE_STATUS]
[ENDIF]
[USER_DEFINED_TARGET_PROP]

[IF ASSOC_INCIDENT_ID NOT NULL]
    [ASSOC_INCIDENT_ID_LABEL]=[ASSOC_INCIDENT_ID]
    [ASSOC_INCIDENT_STATUS_LABEL]=[ASSOC_INCIDENT_STATUS]
    [ASSOC_INCIDENT_OWNER_LABEL]=[ASSOC_INCIDENT_OWNER]
    [ASSOC_INCIDENT_ACKNOWLEDGED_BY_OWNER_LABEL]=[ASSOC_INCIDENT_ACKNOWLEDGED_BY_OWNER]
    [ASSOC_INCIDENT_PRIORITY_LABEL]=[ASSOC_INCIDENT_PRIORITY]
    [ASSOC_INCIDENT_ESCALATION_LEVEL_LABEL]=[ASSOC_INCIDENT_ESCALATION_LEVEL]
[ENDIF]
[EVENT_TYPE_LABEL]=[EVENT_TYPE]
[EVENT_NAME_LABEL]=[EVENT_NAME]
-- if it is a repeat email, show the repeat count
[IF NOTIF_TYPE EQ "NOTIF_REPEAT"]
    [REPEAT_COUNT_LABEL]=[REPEAT_COUNT]
[ENDIF]
-- Event Dedup related Attributes
[IF TOTAL_OCCURRENCE_COUNT NOT NULL]
    [TOTAL_OCCURRENCE_COUNT_LABEL]=[TOTAL_OCCURRENCE_COUNT]
[ENDIF]
[IF CURRENT_OCCURRENCE_COUNT NOT NULL]
    [CURRENT_OCCURRENCE_COUNT_LABEL]=[CURRENT_OCCURRENCE_COUNT]
[ENDIF]
[IF CURRENT_FIRST_OCCUR_DATE NOT NULL]
    [CURRENT_FIRST_OCCUR_DATE_LABEL]=[CURRENT_FIRST_OCCUR_DATE]
[ENDIF]
[IF CURRENT_LAST_OCCUR_DATE NOT NULL]
    [CURRENT_LAST_OCCUR_DATE_LABEL]=[CURRENT_LAST_OCCUR_DATE]
[ENDIF]
[EVENT_TYPE_ATTRS]

[IF RCA_STATUS NOT NULL]
    [RCA_STATUS_LABEL]=[RCA_STATUS]
[ENDIF]

-- Root Cause Analysis details shows up when available. This is 
-- normally applies to availability alerts for service targets
[RCA_DETAILS]

[RULE_NAME_LABEL]=[RULE_NAME]
[RULE_OWNER_LABEL]=[RULE_OWNER]
-- Check if any updates
[IF UPDATES NOT NULL]
[UPDATES_LABEL]:[UPDATES]
[ENDIF]

Updating the Subject Template

The default email subject looks like this:

The default template for the email Subject is:

-- Enterprise Manager Default Event Template

-- Subject of an e-mail is rendered in one line.
-- The resulting text from the following logic will be concatenated together into one line.

-- if this is a repeat email
-- show the repeat count
[IF NOTIF_TYPE EQ "NOTIF_REPEAT"]
    \[[REPEAT_LABEL] #[REPEAT_COUNT]\]
[ENDIF]
[EM_EVENT_PREFIX]: 

-- if it is an email for success or failure of corrective action 
-- show the name and execution status of the corrective action
[IF NOTIF_TYPE EQ "NOTIF_CA"]
    CA:[CA_JOB_NAME]:[CA_JOB_STATUS]
[ELSE] -- Regular email for metric alert
    [SEVERITY]:[TARGET_NAME]
[ENDIF]
-- Show message if available
- [MESSAGE]

After applying my custom template:

[IF NOTIF_TYPE EQ "NOTIF_REPEAT"]
    \[[REPEAT_LABEL] #[REPEAT_COUNT]\]
[ENDIF]
\[OEM\]

[IF NOTIF_TYPE EQ "NOTIF_CA"]
    CA:[CA_JOB_NAME]:[CA_JOB_STATUS]
[ELSE]
    \[[SEVERITY]\] [TARGET_NAME]
[ENDIF]
: [MESSAGE]

The custom email subject now looks like this:

In my opinion, the little subtle changes make it easier to visually filter on, particularly as tens or hundreds of emails come in.

Custom Email Body #1

I played around with a few custom templates, updating the original template to look a little more streamlined:

The template for this custom Metric Alert notification is:

-- Enterprise Manager custom template

[IF HOST_NAME NOT NULL]
    [HOST_NAME_LABEL]
    [HOST_NAME]
     
[ENDIF]

-- Target name links to the respective target home page 
-- in Enterprise Manager console
[IF TARGET_NAME NOT NULL]
    [TARGET_TYPE_LABEL]
    [TARGET_TYPE]
     

    [TARGET_NAME_LABEL]
    [TARGET_NAME]
     
[ENDIF]

[IF CATEGORIES NOT NULL]
    [CATEGORIES_LABEL]
    [CATEGORIES]
     
[ENDIF]

[MESSAGE_LABEL]
[MESSAGE]
 

[SEVERITY_LABEL]
[SEVERITY]
 

[EVENT_REPORTED_TIME_LABEL]
[EVENT_REPORTED_TIME]
 

[IF ASSOC_INCIDENT_ID NOT NULL]
    [ASSOC_INCIDENT_ID_LABEL]
    [ASSOC_INCIDENT_ID]
     

    [ASSOC_INCIDENT_STATUS_LABEL]
    [ASSOC_INCIDENT_STATUS]
     
[ENDIF]

[EVENT_TYPE_LABEL]
[EVENT_TYPE]
 

[EVENT_NAME_LABEL]
[EVENT_NAME]
 

-- if it is a repeat email, show the repeat count
[IF NOTIF_TYPE EQ "NOTIF_REPEAT"]
    [REPEAT_COUNT_LABEL]
    [REPEAT_COUNT]
     
[ENDIF]

-- Event Dedup related Attributes
[IF TOTAL_OCCURRENCE_COUNT NOT NULL]
    [TOTAL_OCCURRENCE_COUNT_LABEL]
    [TOTAL_OCCURRENCE_COUNT]
     
[ENDIF]

[IF CURRENT_OCCURRENCE_COUNT NOT NULL]
    [CURRENT_OCCURRENCE_COUNT_LABEL]
    [CURRENT_OCCURRENCE_COUNT]
     
[ENDIF]

[IF CURRENT_FIRST_OCCUR_DATE NOT NULL]
    [CURRENT_FIRST_OCCUR_DATE_LABEL]
    [CURRENT_FIRST_OCCUR_DATE]
     
[ENDIF]

[IF CURRENT_LAST_OCCUR_DATE NOT NULL]
    [CURRENT_LAST_OCCUR_DATE_LABEL]
    [CURRENT_LAST_OCCUR_DATE]
     
[ENDIF]

[RULE_NAME_LABEL]
[RULE_NAME]
 

[EVENT_TYPE_ATTRS]
 

Custom Email Body #2

I prefer an even further reduced email notification as follows:

The template for this custom Metric Alert notification is:

-- Enterprise Manager custom template

\[[SEVERITY]\] [EVENT_REPORTED_TIME]
 

-- Target name links to the respective target home page 
-- in Enterprise Manager console
[IF TARGET_NAME NOT NULL]
    \[[TARGET_TYPE]\] [TARGET_NAME]
     
[ENDIF]

\[[EVENT_NAME]\] [MESSAGE]
 

[IF ASSOC_INCIDENT_ID NOT NULL]
    \[[ASSOC_INCIDENT_ID_LABEL]\] [ASSOC_INCIDENT_ID]
     
[ENDIF]

-- if it is a repeat email, show the repeat count
[IF NOTIF_TYPE EQ "NOTIF_REPEAT"]
    \[[REPEAT_COUNT_LABEL]\] [REPEAT_COUNT]
     
[ENDIF]

-- Event Dedup related Attributes
[IF TOTAL_OCCURRENCE_COUNT NOT NULL]
    \[[TOTAL_OCCURRENCE_COUNT_LABEL]\] [TOTAL_OCCURRENCE_COUNT]
     
[ENDIF]

[IF CURRENT_OCCURRENCE_COUNT NOT NULL]
    \[[CURRENT_OCCURRENCE_COUNT_LABEL]\] [CURRENT_OCCURRENCE_COUNT]
     
[ENDIF]

[IF CURRENT_FIRST_OCCUR_DATE NOT NULL]
    \[[CURRENT_FIRST_OCCUR_DATE_LABEL]\] [CURRENT_FIRST_OCCUR_DATE]
     
[ENDIF]

[IF CURRENT_LAST_OCCUR_DATE NOT NULL]
    \[[CURRENT_LAST_OCCUR_DATE_LABEL]\] [CURRENT_LAST_OCCUR_DATE]
     
[ENDIF]

\[Rule Name\] [RULE_NAME]
 

Obviously, you may need to update the templates for various other email types as needed (e.g., Target Availability Events).

References

  • Enterprise Manager Cloud Control Administrator's Guide 13.2: Email Customization
https://docs.oracle.com/cd/E73210_01/EMADM/GUID-B48F6A84-EE89-498D-94E0-5DE1E7A0CFBC.htm#EMADM9092