You can create a notification rule for an event that triggers the execution of a Borne shell script on the management server. The Borne shell script must be executable by the root user.
The script should be written to direct its output (stdout/stderr) to a log file.
The fields of the event are passed into the script as environment variables:
N1SM_SCRIPT_DESCRIPTION
N1SM_SCRIPT_TOPIC
N1SM_SCRIPT_USER
N1SM_SCRIPT_TIME
N1SM_SCRIPT_SUBJECT
N1SM_SCRIPT_SOURCE
N1SM_SCRIPT_SEVERITY
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> create notification notification destination destination topic topic type script |
The event notification is created and enabled. The destination must be a fully qualified path to a custom Bourne shell script used to manage the notification. The script must be executable by the root user. See create notification in Sun N1 System Manager 1.3 Command Line Reference Manual for details and valid topics.
If the script is executed as a result of an event triggered internally by the N1 System Manager, the script is executed as root.
If the script is executed as a result of an event triggered by a user, the script is executed by the user that triggered the event.
Type the following command:
N1-ok> start notification notification test |
A test notification message is sent. See start notification in Sun N1 System Manager 1.3 Command Line Reference Manual for details.