For an Email Notifier Adapter, the configuration file is mail-notify.conf:
Whenever you modify a configuration file, you need to stop and restart the notifier for the changes to take effect.
-
Using the sm_edit utility, open the configuration file:
BASEDIR/smarts/bin>./sm_edit conf/notifier/mail-notify.conf
-
If you are developing multiple customized notification adapters, rename the configuration file, giving the file a relevant name (for example, if you are going to customize the Email Notifier Adapter to send emails for all problems related to Routers, you could name the file mail-notify-Router.conf). The sm_edit utility automatically saves this file to the BASEDIR/smarts/local/conf/notifierdirectory.
-
Modify the file to change the name of the Domain Manager or Global Manager:
serverName = <YOUR_INCHARGE_MANAGER>
-
Define the hostname of the appropriate mail server:
MailServer = "localhost"
-
Definethe recipients for the notification email. Multiple email addresses should be separated by a comma:
Recipients = "root@localhost,recipient@your_company.com"
-
Define the email address of the sender. This address will display in the From field of the email message:
SenderId = "daemon@localhost"
-
Add the following lines to specify the ASL scripts that contain your customizations. The lines should be added to the end of the file below the initialEventDelay parameter:
filterRuleSet = "notifier/mail/mail-filter.asl" customRuleSet ="notifier/mail/mail-custom.asl"
-
Modify the SubscribesTo parameter to define the specific notifications for which you want email alerts sent.
For a Global Manager, you indicate which notifications generate
emails by defining a notification list in the Subscriptions section:
SubscribesTo = { # # NL subscription. # GA_NLSubscription::mail-Default-Subscriptions { NLName = "Default" } }
-
Save the modified configuration file. The sm_edit utility automatically saves the file to the BASEDIR/smarts/local/conf/notifier directory.
Note:Appendix B, Example Files, contains complete samples of the configuration file.