The SMTP server configuration options are accessed through Global Settings (View > Navigator pane > Configuration >Global Settings > Alerting tab > Email).
Select the drop-down list to choose a previously configured SMTP server, or select to open the Select an SMTP Server dialog box, and configure a new SMTP server.
Note: The chosen SMTP server is the globally defined SMTP server, and is used for all notification purposes unless it's overridden at the site level. For more information, see the Configuring a Site Level SMTP Server section below.
Adding a New SMTP Server
1. From the Alerting tab email option, select to open the Select an SMTP Server dialog box.
2. Select New to open the SMTP Server Editor dialog box.
3. Enter the IP address or the domain name of the SMTP Server in the SMTP Server box. Enter the email you want to send the notifications in the From Address box.
Note: Configure any additional security settings on the SMTP Security tab.
4. Select Test to open the Send SMTP Test Email box, and then enter an email in the slot provided. Select Send to send the test email to the desired address.
5. Select OK to close the SMTP Server Editor and save your SMTP server settings.
Important: For the most accurate SMTP test, use the SQL Sentry Client installed on the Server computer to send the test message. If you use a SQL Sentry Client on a different computer, such as your local workstation, the results may differ. For example, your SMTP server may allow relay from your workstation but not from the SQL Sentry Server computer, in which case the test from your workstation would succeed; but the SQL Sentry Server would be unable to deliver notifications.
Note: The SMTP security settings are optional, and aren't required in most environments.
SMTP Configuration Options
|SMTP Server||Enter the IP Address or the Domain Name of the SMTP Server. When using localhost, this will be the local SMTP server on the machine where the SQL Sentry Monitoring Service is installed.|
|From Address||Specify the From Address for Email notifications.|
SMTP Security (Optional)
|Username||Enter the username used to authenticate with the SMTP Server.|
|Password||Enter the password used to authenticate with the SMTP Server.|
|Enable SSL||Specify if your SMTP server uses a Secure Socket Layer (SSL) protocol.|
|Use Custom Port||Select the outgoing port for the SMTP Server.|
Configuring a Site Level SMTP Server
SQL Sentry allows you to configure multiple SMTP servers for the different sites within your environment. This allows you to specify an SMTP server, or an SMTP server group that is local for each site, simplifying permissions, and reducing traffic over WANs.
Configure site level SMTP servers through the Site settings found in the Settings pane.
- Select your desired site in the Navigator pane, and then open the Settings pane (View > Settings).
- In the Settings pane, select Site Settings from the top drop-down list.
- Change the Inherit From Parent setting to False.
The SMTP Server General setting lists the current SMTP server. Select the current SMTP server and select the command to open the Select an SMTP Server dialog box. Choose your desired SMTP server and select the OK command to specify the SMTP server for your site.
To provide failover capabilities, SQL Sentry provides you with the ability to create SMTP server groups. To create an SMTP server group, add your SMTP servers to your SQL Sentry environment, as outlined previously in the Adding a New SMTP Server section.
Create the SMTP server group by completing these steps:
1. From the Select an SMTP Server dialog box, select New to open the SMTP Server Editor dialog box.
2. Select the Type drop-down list and choose Server Group. Give the Server Group a name, and select Add to open the Add SMTP Servers box.
3. Choose your desired server, and select OK to add the server to your server group.
4. Select OK in the SMTP Server Editor dialog box to save your server group. Your server group is now available in the Select an SMTP Server dialog box.
SMTP Server Group Failover Process
The SMTP servers in a group will failover in sequence, according to the order in which they are listed in the SMTP Server Editor dialog box. Change this order by using the arrow buttons located at the bottom of the dialog box.
An SMTP Server Fails
When an SMTP server fails, the monitoring service will attempt to use the next SMTP server in sequence to send the message. If the Monitoring service is successful in using this SMTP server, the same SMTP Server is used the next time the monitoring service needs to send a message.
When the failure Condition is detected the monitoring service will attempt to complete the send email action using SMTP_A, which is the first server in the group. If the monitoring service is unable to send the message through SMTP_A, it tries SMTP_B. If it's successful, the monitoring service uses SMTP_B the next time it needs to complete a send email action.
Every SMTP Server Fails
In the event that every SMTP server in the group is unavailable when the monitoring service attempts to complete a send email action, a Monitoring Service: Action Failed Condition is triggered. Given our previous example SMTP group above, this process would work as follows:
If the monitoring service is unable to send the email message through SMTP_A, it tries SMTP_B, then SMTP_C, and finally SMTP_D. If the monitoring service completes a cycle through each SMTP server in the SMTP Server group, and is still unable to complete the send email action, a Monitoring Service Action: Failed Condition is triggered.
Resetting the Failover Process
Changes made to an SMTP server group, including changes to the evaluation order, or additions and deletions of SMTP servers effectively reset the failover process. Once the failover process has been reset, the monitoring service attempts to process send email actions starting with the first SMTP server defined for the group.