Section 17.5. Receiving E-mail Notifications


17.5. Receiving E-mail Notifications

If there is a SMTP server in your network, you can enable DB2 to send notification e-mails to you automatically through this SMTP server. This way, you do not have to monitor the administration notification log all the time: you will receive an e-mail when a problem occurs.

Note that you must set NOTIFYLEVEL to a value of 2 or higher for the Health Monitor to send any notifications to the contacts defined in its configuration. The HEALTH_MON Database Manager Configuration parameter must be set to ON (the default).

Follow these steps to enable DB2 to send notification automatically.

1.

Add contact information with the add contact command. Use this command to add all the e-mail addresses that should receive notification e-mails from DB2. For example:

 add contact sylvia type email address sylvia@youracme.com 

You can also create a contact group using the add contactgroup command to contain all the individual contacts. To display the contacts who already have been added, use the get contacts command. Refer to the file Command_and_SQL_Examples.pdf on the CD-ROM accompanying this book for examples showing how to use these commands.

2.

Update the health notification contact list using:

 update notification list        add contact contact_name_from_step_1 

or

 update notification list        add group contact_group_name_from_step_1 

Use the get health notification contact list command to display the contact list.

3.

Update the CONTACT_HOST DAS parameter to indicate the host name or the IP address of the server where the contact information (from steps 1 and 2) is stored. For example:

 update admin cfg using CONTACT_HOST prodserv1 

4.

Update the SMTP_SERVER DAS parameter to indicate the host name or the IP address of the SMTP server. For example:

 update admin cfg using SMTP_SERVER smtpserv1 

5.

Restart the DAS using db2admin stop and db2admin start.

6.

Make sure that the SMTP server is working. Also, the DB2 Health Monitor uses TCP/IP port 25, so port 25 must be open on the SMTP server. To test whether port 25 is open, from the DB2 server perform a telnet test as follows:

 telnet SMTP_SERVER 25 

If you get output similar to the following, then port 25 is enabled.

[View full width]

Trying... Connected to <SMTP_SERVER>. Escape character is '^]'. 220 <SMTP_SERVER> ESMTP Service (Lotus Domino Release 5.0.8) ready at Thu, 29 Apr 2004 13 :21:49 -0400

If you do not get output like this or your session hangs, contact your network administrator to enable this port.



Understanding DB2(R. Learning Visually with Examples)
Understanding DB2: Learning Visually with Examples (2nd Edition)
ISBN: 0131580183
EAN: 2147483647
Year: 2004
Pages: 313

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net