The N1 System Manager provides the ability to set up email or SNMP notifications when events occur, either within the N1 System Manager itself or when specific events occur on provisionable servers. You can set up customized notification rules for as many different scenarios as you need. Setting up notifications can be done only through the command line.
Use the create notification command to create notification rules based on events that occur or might occur about which you are interested. Use a topic to create a notification.
For setting up notifications using SNMP traps, use the SNMP MIB located at /opt/sun/n1gc/etc/SUN-N1SM-TRAP-MIB.mib. For more information about SNMP MIBs, see Monitoring MIBs.
A notification rule can be used to send a notification of each type of event to a selected destination, using either email or SNMP as the communication medium. For example, you can create a notification rule so that each time a new provisionable server is discovered by the management server, you receive a message on your pager to indicate that the event has happened:
create notification notification destination destination topic topic type type [description description] |
See create notification in Sun N1 System Manager 1.1 Command Line Reference Manual for details of the terms used in this command syntax.
You can configure your SMTP server to use event notification, during the installation and configuration of the N1 System Manager. See Configuring the N1 System Manager System in Sun N1 System Manager 1.1 Installation and Configuration Guide.
Use the show and set commands with the notification option to view and modify notification details. Type help show notification or help set notification at the N1–ok command line for syntax and parameter details.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> show notification all |
The notifications for which you have read privileges appear in the output. See show notification in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> show notification notification |
The specified notification details appear in the output. See show notification in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
N1-ok> show notification test2 Name: test2 Event Topic: EReport.Physical.ThresholdExceeded Notifier Type: Email Destination: nobody@sun.com State: enabled |
This procedure describes how to change the name, description, or destination of a notification.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> set notification notification name name description description destination destination |
The specified notification attributes are set to the new values specified. See set notification in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
This example shows how to use the set notification command with the name option to change a notification name from test2 to test3.
N1-ok> set notification test2 name test3 |
Use the create or delete command with the notification option to create and delete notifications.
Use the create command with the notification option and the test subcommand to test a notification.
Type help create notification or help delete notification at the N1–ok command line for syntax and parameter details.
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 notification is created and enabled. See create notification in Sun N1 System Manager 1.1 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.1 Command Line Reference Manual for details.
This example shows how to create a notification to be sent by email if a physical threshold value is exceeded. The notification is called test2. The recipient's email address is nobody@sun.com
N1-ok> create notification test2 destination nobody@sun.com topic EReport.Physical.ThresholdExceeded type email |
The show notification command can be used to verify that the notification has been created.
N1-ok> show notification Name Event Topic Destination State test2 EReport.Physical.ThresholdExceeded nobody@sun.com enabled |
This example shows how to create a notification to be sent by SNMP if a physical threshold value is exceeded. The notification is called test23. The recipient SNMP address is sun.com
N1-ok> create notification test23 destination sun.com topic EReport.Physical.ThresholdExceeded type snmp |
The show notification command can be used to verify that the notification has been created.
N1-ok> show notification Name Event Topic Destination State test23 EReport.Physical.ThresholdExceeded sun.com enabled |
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> delete notification notification |
The notification is deleted.
Notifications are enabled, or started, by default at creation. Use the start command with the notification option to enable a notification that has been disabled. Type help start notification at the N1–ok command line for syntax and parameter details.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> start notification notification |
The notification is enabled. See start notification in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> stop notification notification |
The notification is disabled. See stop notification in Sun N1 System Manager 1.1 Command Line Reference Manual for details.