Passing Information to a PL/SQL Procedure
Passing event, incident, and problem information (payload) to PL/SQL procedures allows you to customize automated responses to these conditions. All three types of notification payloads have a common element: gc$notif_msg_info
. It provides generic information that applies to all types of notifications. In addition, each of the three payloads have one specific element that provides the payload specific to the given issue type.
gc$notif_event_msg (payload for event notifications)
gc$notif_event_msg contains two objects - event payload object and message information object.
Table 6-35 Event Notification Payload
Attribute | Datatype | Additional Information |
---|---|---|
EVENT_PAYLOAD |
gc$notif_event_payload |
Event notification payload. See gc$notif_event_payload type definition for detail. |
MSG_INFO |
gc$notif_msg_info |
Notification message. See gc$notif_msg_info definition for detail. |
gc$notif_incident_msg (payload for incident notifications)
gc$notif_incident_msg type contains two objects - incident payload and message information. This object represents the delivery payload for Incident notification message, contains all data associated with Incident notification, and can be accessed by user's custom PL/SQL procedures.
Table 6-36 Incident Notification Payload
Attribute | Datatype | Additional Information |
---|---|---|
INCIDENT_PAYLOAD |
gc$notif_incident_payload |
Incident notification payload. See gc$notif_incident_payload type definition for detail. |
MSG_INFO |
gc$notif_msg_info |
Envelope level notification information. See gc$notif_msg_info type definition for detail. |
gc$notif_problem_msg (payload for problem notifications)
This object represents the delivery payload for Problem notification message, contains all data associated with problem notification, and can be accessed by a user's custom PL/SQL procedures.
Table 6-37 Problem Notification Payload
Attribute | Datatype | Additional Information |
---|---|---|
PROBLEM_PAYLOAD |
gc$notif_problem_payload |
Problem notification payload. See gc$notif_problem_payload type definition for detail. |
MSG_INFO |
gc$notif_msg_info |
Notification message. See gc$notif_msg_info type definition for detail. |
gc$notif_msg_info (common for event/incident/problem payloads)
This object contains the generic notification information including notification_type, rule set and rule name, etc. for Event, Incident or Problem delivery payload.
Table 6-38 Event, Incident, Problem Common Payload
Attribute | Datatype | Description |
---|---|---|
NOTIFICATION_TYPE |
VARCHAR2(32) |
Type of notification, can be one of the following values. GC$NOTIFICATION.NOTIF_NORMAL GC$NOTIFICATION.NOTIF_RETRY GC$NOTIFICATION.NOTIF_REPEAT GC$NOTIFICATION.NOTIF_DURATION GC$NOTIFICATION.NOTIF_CA GC$NOTIFICATION.NOTIF_RCA |
REPEAT_COUNT |
NUMBER |
Repeat notification count |
RULESET_NAME |
VARCHAR2(256) |
Name of the rule set that triggered the notification |
RULE_NAME |
VARCHAR2(256) |
Name of the rule that triggered the notification |
RULE_OWNER |
VARCAH2(256) |
EM User who owns the rule set |
MESSAGE |
VARCHAR2(4000) |
Message about event/incident/problem. |
MESSAGE_URL |
VARCHAR2(4000) |
Link to the Enterprise Manager console page that provides the details of the event/incident/problem. |
gc$notif_event_payload (payload specific to event notifications)
This object represents the payload specific to event notifications.
Table 6-39 Common Payloads for Events, Incidents, and Problems
Attribute | Datatype | Additional Information |
---|---|---|
EVENT_INSTANCE_GUID |
RAW(16) |
Event instance global unique identifier. |
EVENT_SEQUENCE_GUID |
RAW(16) |
Event sequence global unique identifier. |
TARGET |
gc$notif_target |
Related Target Information object. See gc$notif_target type definition for detail. |
SOURCE |
gc$notif_source |
Related Source Information object, that is not a target. See gc$notif_source type definition for detail. |
EVENT_ATTRS |
gc$notif_event_attr_array |
The list of event specified attributes. See gc$notif_event_attr type definition for detail. |
CORRECTIVE_ACTION |
gc$notif_corrective_action_job |
Corrective action information, optionally populated when corrective action job execution has completed. |
EVENT_TYPE |
VARCHAR2(20) |
Event type - example: Metric Alert. |
EVENT_NAME |
VARCHAR2(512) |
Event name. |
EVENT_MSG |
VARCHAR2(4000) |
Event message. |
REPORTED_DATE |
DATE |
Event reported date. |
OCCURRENCE_DATE |
DATE |
Event occurrence date. |
SEVERITY |
VARCHAR2(128) |
Event Severity. It is the translated severity name. |
SEVERITY_CODE |
VARCHAR2(32) |
Event Severity code. It is the internal severity name used in Enterprise Manager. |
ASSOC_INCIDENT |
gc$notif_issue_summary |
Summary of associated incident. It is populated if the event is associated with an incident. See gc$notif_issue_summary type definition for detail |
ACTION_MSG |
VARCHAR2(4000) |
Message describing the action to take for resolving the event. |
RCA_DETAIL |
VARCHAR2(4000) |
Root cause analysis detail. The size of RCA details output is limited to 4000 characters long. |
EVENT_CONTEXT_DATA |
gc$notif_event_context_array |
Event context data. See gc$notif_event_context type definition for detail. |
CATEGORIES |
gc$category_string_array |
List of categories that the event belongs to. Category is translated based on locale defined in OMS server. Notification system sends up to 10 categories. |
CATEGORY_CODES |
gc$category_string_array |
Codes for the categories. The size of array is up to 10. |
gc$notif_incident_payload (payload specific to incident notifications)
Contains the incident specific attributes, associated problem and ticket information.
Table 6-40 Incident Notification Payloads
Attribute | Datatype | Additional Information |
---|---|---|
INCIDENT_ATTRS |
gc$notif_issue_attrs |
Incident specific attributes. See gc$notif_issue_attrs type definition for detail. |
ASSOC_EVENT_COUNT |
NUMBER |
The total number of events associated with this incident. |
TICKET_STATUS |
VARCHAR2(64) |
The status of external Ticket, if it exists. |
TICKET_ID |
VARCHAR2(128) |
The ID of external Ticket, if it exists. |
TICKET_URL |
VARCHAR2(4000) |
The URL for external Ticket, if it exists. |
ASSOC_PROBLEM |
gc$notif_issue_summary |
Summary of the problem, if it has an associated problem. See gc$notif_issue_summary type definition for detail. |
gc$notif_problem_payload (payload specific to problems)
Contains problem specific attributes, key, Service Request(SR) and Bug information.
Table 6-41 Problem Payload
Attribute | Datatype | Additional Information |
---|---|---|
PROBLEM_ATTRS |
gc$notif_issue_attrs |
Problem specific attributes. See gc$notif_issue_attrs type definition for detail. |
PROBLEM_KEY |
VARCHAR2(850) |
Problem key if it is generated. |
ASSOC_INCIDENT_COUNT |
NUMBER |
Number of incidents associated with this problem. |
SR_ID |
VARCHAR2(64) |
Oracle Service Request Id, if it exists. |
SR_URL |
VARCHAR2(4000) |
URL for Oracle Service Request, if it exists. |
BUG_ID |
VARCHAR2(64) |
Oracle Bug ID, if an associated bug exists. |
gc$notif_issue_attrs (payload common to incidents and problems)
Provides common details for incident and problem. It contains details such as id, severity, priority, status, categories, acknowledged by owner, and source information with which it is associated.
Table 6-42 Payload Common to Incidents and Problems
Attribute | Datatype | Additional Information |
---|---|---|
ID |
NUMBER(16) |
ID of the incident or problem. |
SEVERITY |
VARCHAR2(128) |
Issue Severity. It is the translated. |
SEVERITY_CODE |
VARCHAR2(32) |
Issue Severity Code.The possible values are defined in descending order of severity: GC$EVENT.FATAL GC$EVENT.CRITICAL GC$EVENT.WARNING GC$EVENT.MINOR_WARNING GC$EVENT.INFORMATIONAL GC$EVENT.CLEAR |
PRIORITY |
VARCHAR2(128) |
Issue Priority. It is the translated priority name. |
PRIORITY_CODE |
VARCHAR2(32) |
Issue Priority. It is the internal value defined in EM. The possible values are defined in descending order of priority: GC$EVENT.PRIORITY_URGENT GC$EVENT.PRIORITY_VERY_HIGH GC$EVENT.PRIORITY_HIGH GC$EVENT.PRIORITY_MEDIUM GC$EVENT.PRIORITY_LOW GC$EVENT.PRIORITY_NONE |
STATUS |
VARCHAR2(32) |
Status of Issue. The possible values are GC$EVENT.STATUS_NEW GC$EVENT.STATUS_CLOSED Any other user defined status. |
ESCALATION_LEVEL |
NUMBER(1) |
Escalation level of the issue, has a value between 0 to 5. |
OWNER |
VARCHAR(256) |
Issue Owner. Set to NULL if no owner exists. |
ACKNOWLEDGED_BY_OWNER |
NUMBER(1) |
Set to 1, if this issue was acknowledged by owner. |
CREATION_DATE |
DATE |
Issue creation date. |
CLOSED_DATE |
DATE |
Issue closed date, null if not closed. |
CATEGORIES |
gc$category_string_array |
List of categories that the event belongs to. Category is translated based on locale defined in OMS server. Notification system sends up to 10 categories. |
CATEGORY_CODES |
gc$category_string_array |
Codes for the categories. Notification system sends up to 10 category codes. |
SOURCE_INFO_ARR |
gc$notif_source_info_array |
Array of source information associated with this issue. See $gcnotif_source_info type definition for detail. |
LAST_MODIFIED_BY |
VARCHAR2(256) |
Last modified by user. |
LAST_UPDATED_DATE |
DATE |
Last updated date. |
gc$notif_issue_summary (common to incident and problem payloads)
Represents the associated incident summary in the event payload, or associated problem summary in the incident payload, respectively.
Table 6-43 Payload
Attribute | Datatype | Additional Information |
---|---|---|
ID |
NUMBER |
Issue Id, either Incident Id or Problem Id. |
SEVERITY |
VARCHAR(128) |
The severity level of an issue. It is translated severity name. |
SEVERITY_CODE |
VARCHAR2(32) |
Issue Severity Code, has one of the following values. GC$EVENT.FATAL GC$EVENT.CRITICAL GC$EVENT.WARNING GC$EVENT.MINOR_WARNING GC$EVENT.INFORMATIONAL GC$EVENT.CLEAR |
PRIORITY |
VARCHAR2(128) |
Current priority. It is the translated priority name. |
PRIORITY_CODE |
VARCHAR2(32) |
Issue priority code, has one of the following values. GC$EVENT.PRIORITY_URGENT GC$EVENT.PRIORITY_VERY_HIGH GC$EVENT.PRIORITY_HIGH GC$EVENT.PRIORITY_MEDIUM GC$EVENT.PRIORITY_LOW GC$EVENT.PRIORITY_NONE |
STATUS |
VARCHAR2(64) |
Status of issue. The possible values are GC$EVENT.STATUS_NEW GC$EVENT.STATUS_CLOSED GC$EVENT.WIP (work in progress) GC$EVENT.RESOLVED any other user defined status |
ESCALATION_LEVEL |
VARCHAR2(2) |
Issue escalation level range from 0 to 5, default 0. |
OWNER |
VARCHAR2(256) |
Issue Owner. Set to NULL if no owner exists. |
ACKNOWLEDGED_BY_OWNER |
NUMBER(1) |
Set to 1, if this issue was acknowledged by owner. |
gc$category_string_array
gc$category_string_array is an array of string containing the categories which event, incident or problem is associated with. The notification system delivers up to 10 categories.
gc$notif_event_context_array
gc$notif_event_context_array provides information about the additional diagnostic data that was captured at event detection time. Note that notification system delivers up to 200 elements from the captured event context. Each element of this array is of the type gc$notif_event_context.
gc$notif_event_context: This object represents the detail of event context data which is additional contextual information captured by the source system at the time of event generation that may have diagnostic value. The context for an event should consist of a set of keys and values along with data type (Number or String only).
Table 6-44 Event Context Type
Attribute | Datatype | Additional Information |
---|---|---|
NAME |
VARCHAR2(256) |
The event context name. |
TYPE |
NUMBER(1) |
The data type of the value, which is stored (0) - for numeric data (1) - for string data. |
VALUE |
NUMBER |
The numerical value. |
STRING_VALUE |
VARCHAR2(4000) |
The string value. |
gc$notif_corrective_action_job
Provides information about the execution of a corrective action job. Note that the corrective actions are supported for metric alert and target availability events only.
Table 6-45 Corrective Action Job-Specific Attributes
Attribute | Datatype | Additional Information |
---|---|---|
JOB_GUID |
RAW(16) |
Corrective action job global unique identifier. |
JOB_NAME |
VARCHAR2(128) |
The value will be the name of the corrective action. It applies to Metric Alert and Target Availability Events. |
JOB_OWNER |
VARCHAR2(256) |
Corrective action job owner. |
JOB_TYPE |
VARCHAR2(256) |
Corrective action job type. |
JOB_STATUS |
VARCHAR2(64) |
Corrective action job execution status. |
JOB_STATUS_CODE |
NUMBER |
Corrective action job execution status code. It is the internal value defined in Enterprise Manager. For more information on status codes, see Table 6-14. |
JOB_STEP_OUTPUT |
VARCHAR2(4000) |
The value will be the text output from the corrective action execution. This will be truncated to last 4000 characters. |
JOB_EXECUTION_GUID |
RAW(16) |
Corrective action job execution global unique identifier. |
JOB_STATE_CHANGE_GUID |
RAW(16) |
Corrective action job change global unique identifier. |
OCCURRED_DATE |
DATE |
Corrective action job occurred date. |
gc$notif_source_info_array
Provides access to the multiple sources to which an incident or a problem could be related. NOTE: The notification system delivers up to 200 sources associated with an incident or a problem.
CREATE OR REPLACE TYPE gc$notif_source_info_array AS VARRAY(200) OF gc$notif_source_info;
gc$notif_source_info
Notification source information which is used for referencing source information containing either target or source, or both.
Table 6-46 Source Information Type
Attribute | Datatype | Additional Information |
---|---|---|
TARGET |
gc$notif_target |
It is populated when the event is related to a target. See gc$notif_target type definition for detail. |
SOURCE |
gc$notif_source |
It is populated when the event is related to a (non-target) source. See gc$notif_source type definition for detail. |
gc$notif_source
Used for referencing source objects other than a job target.
Table 6-47 Payload
Attribute | Datatype | Additional Information |
---|---|---|
SOURCE_GUID |
RAW(16) |
Source's global unique identifier. |
SOURCE_TYPE |
VARCHAR2(120) |
Type of the Source object, e.g., TARGET, JOB, TEMPLATE, etc. |
SOURCE_NAME |
VARCHAR2(256) |
Source Object Name. |
SOURCE_OWNER |
VARCHAR2(256) |
Owner of the Source object. |
SOURCE_SUB_TYPE |
VARCHAR2(256) |
Sub-type of the Source object, for example, within the TARGET these would be the target types like Host, Database etc. |
SOURCE_URL |
VARCHAR2(4000) |
Source's event console URL. |
gc$notif_target
Target information object is used for providing target information.
Table 6-48 Target Information
Attribute | Datatype | Additional Information |
---|---|---|
TARGET_GUID |
RAW(16) |
Target's global unique identifier. |
TARGET_NAME |
VARCHAR2(256) |
Name of target. |
TARGET_OWNER |
VARCHAR2(256) |
Owner of target. |
TARGET_LIFECYCLE_STATUS |
VARCHAR2(1024) |
Life Cycle Status of the target. |
TARGET_VERSION |
VARCHAR2(64) |
Target Version of the target. |
TARGET_TYPE |
VARCHAR2(128) |
Type of a target. |
TARGET_TIMEZONE |
VARCHAR2(64) |
Target's regional time zone. |
HOST_NAME |
VARCHAR2(256) |
The name of the host on which the target is deployed upon. |
TARGET_URL |
VARCHAR2(4000) |
Target's EM Console URL. |
UDTP_ARRAY |
gc$notif_udtp_array |
The list of user defined target properties. It is populated for events that are associated with a target. It is populated for incidents and problems, when they are associated with a single source (gc$notif_source_info). |
gc$notif_udtp_array
Array of gc$notif_udtp type with a maximum size of 20.
CREATE OR REPLACE TYPE gc$notif_udtp_array AS VARRAY(20) OF gc$notif_udtp
;
gc$notif_udtp
Used for referencing User-defined target properties. UDTP should consist of a set of property key names and property values.
Table 6-49 Payload
Attribute | Datatype | Additional Information |
---|---|---|
NAME |
VARCHAR2(64), |
The name of property. |
VALUE |
VARCHAR2(1024) |
Property value. |
LABEL |
VARCHAR(256) |
Property label. |
NLS_ID |
VARCHAR(64) |
Property nls id |