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 topic topic type type destination destination |
The event notification is created and enabled. See create notification in Sun N1 System Manager 1.2 Command Line Reference Manual for details and valid topics.
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.2 Command Line Reference Manual for details.
This example shows how to create an event notification to be sent by email if a server group is created. Note that an SMTP email server must first be configured using the n1smconfig utility as described in Configuring the N1 System Manager System in Sun N1 System Manager 1.2 Installation and Configuration Guide.
The event notification is called notif2. The recipient's email address is nobody@sun.com
N1-ok> create notification notif2 destination nobody@sun.com Lifecycle.Logical.CreateGroup type email |
The show notification command can be used to verify that the event notification has been created.
N1-ok> show notification Name Event Topic Destination State notif2 EReport.Physical.ThresholdExceeded nobody@sun.com enabled |
The event can be invoked by creating a false group, as a test.
N1-ok> create group test |
An email should be sent if the notification was created successfully. Otherwsie, the following error message is displayed:
Notification test failed. |
Verify if the SMTP server is configured correctly and is reachable, and if the email address used in the notification rule is valid.
This example shows how to create an event notification to be sent by SNMP if a physical threshold value is exceeded. The event notification is called notif3. The recipient SNMP address is sun.com
N1-ok> create notification notif3 destination sun.com topic EReport.Physical.ThresholdExceeded type snmp |
The show notification command can be used to verify that the event notification has been created.
N1-ok> show notification Name Event Topic Destination State notif3 EReport.Physical.ThresholdExceeded sun.com enabled |
You can specify the event notification you want to see by using show notificationcommand with the notification attribute value.
N1-ok> show notification notif3 Name Event Topic Destination State notif3 EReport.Physical.ThresholdExceeded sun.com enabled |