The RED scheduler can send email notifications when jobs fail or complete successfully. This section provides instructions on how to add the required configurations.
Configuring email settings on Scheduler Installation
Windows
The Windows Scheduler installation wizard provides a configuration screen for adding all the required settings.
- On the Email Configuration screen, select Enable email notifications. On this section add the following information.
Email Server
In this field enter the mail host.
Email Server Port
Enter the port your email server is using.
Sender Email
This will be the email address displayed as sender on the email client. - Select Enable authentication and fill the required fields.
Email Server User
Enter the username for the account that will send notifications.
Email Server Password
Enter the password for the account that will send notifications.
Encryption
Select a type of encryptionNote
If you don't want to use an authenticated user for sending email notifications, deselect the Enable authentication option.
- Verify your settings and click Next to continue with the Scheduler installation.
- On the Summary screen, verify your settings are correct and continue with the installation.
Linux
To add email notifications when installing the scheduler on Linux, you need to modify both the web response file and executor response files.
Note
It is recommended
Edit the web server response file and go to the <emailConfig> element.
Under the <emailConfig> modify the following elements.
host
port
user
password
sender
tsl
useAuth
In this parameter enter the encrypted password for the account that will send notifications. To learn more about encrypting the password refer to RED Scheduler Configuration and Encryption Utility.
Click Next to continue with the Scheduler installation
On the Summary screen, verify your settings are correct and continue with the installation.
Setting up the notification recipient
- Open RED, go to the Host Script node and expand it.
- Find and edit the wsl_scheduler_publish script.
- In the wsl_scheduler_publish script find the failure.emails entry.
- Change noreply@foo.com to the email address that will receive notifications.
- Save the Script.
Configuring email settings manually
Windows
If you didn't provide email settings during the scheduler installation, you can add them manually. You need to edit the azkaban.local.properties configuration file in the WEB_SERVER and EXEC_SERVER folders, these folders are located in the Scheduler installation folder, for example c:\pathtoscheduler\WEB_SERVER
and c:\pathtoscheduler\WEB_SERVER
Open azkaban.local.properties and change these parameters to add the email settings:
mail.tsl
Set this parameter to true if the mail server uses TSL, otherwise leave the value as false.
mail.host
In this parameter enter the mail host.
mail.port
Change its value to the port your mail server uses.
mail.password
In this parameter enter the encrypted password for the account that will send notifications. To learn more about encrypting the password refer to RED Scheduler Configuration and Encryption Utility.
mail.user
In this parameter enter the username for the account that will send notifications.
mail.sender
In this parameter enter the email address used for sending notifications.
mail.useAuth
Set the value to true to enable authentication.
Important
Once you add your configurations to azkaban.local.properties in both WEB_SERVER and EXEC_SERVER, you need to restart the Azkaban Webserver and Executor.
Linux
Setting up the notification recipient
- Open RED, go to the Host Script node and expand it.
- Find and edit the wsl_scheduler_publish script.
- In the wsl_scheduler_publish script find the failure.emails entry.
- Change noreply@foo.com to the email address that will receive notifications.
- Save the Script.