Monitoring Service SMTP Configuration
Introduction
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.
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.
SMTP Configuration Options
SMTP Settings | Description |
---|---|
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)
SMTP Settings | Description |
---|---|
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.
SMTP Server Groups
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.
For example, assume you have a send email action configured for the SQL Server Agent Job: Failure Condition, and also you have the following SMTP servers defined sequentially in your group:
1. SMTP_A
2. SMTP_B
3. SMTP_C
4. SMTP_D
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.