Passing Job Execution Status to an OS Command or Script
The notification system passes job execution status information to an OS script or executable via system environment variables. Conventions used to access environmental variables vary depending on the operating system:
-
UNIX: $ENV_VARIABLE
-
MS Windows: %ENV_VARIABLE%
The notification system sets the following environment variables before calling the script. The script can then use any or all of these variables within the logic of the script.
Table 6-17 Environment Variables
Environment Variable | Description |
---|---|
SOURCE_OBJ_NAME |
The name of the job. |
SOURCE_OBJ_OWNE |
The owner of the job. |
SOURCE_OBJ_SUB_TYPE |
The type of job. |
EXEC_STATUS_CODE |
The job status. |
EVENT_REPORTED_TIME |
Time when the severity occurred. |
TARGET_NAME |
The name of the target. |
TARGET_TYPE |
The type of the target. |
RULE_NAME |
Name of the notification rule that resulted in the severity. |
RULE_OWNER |
Name of the Enterprise Manager administrator who owns the notification rule. |