Hi,
Setting up mail is pretty straightforward, although it requires editing files on the ELS server side.
- Go to the
/opt/alert
directory.
- Open
config.yaml
file
- In there you'll find section called
# Email configuration
. Example below:
#smtp_host: "smtp.example.com"
#smtp_port: 587
#smtp_ssl: false
#verify_certs: false
#from_addr: "alert@example.com"
#smtp_auth_file: "/opt/alert/smtp_auth_file.yml"
- Authentication is placed in seperate file -
smtp_auth_file.yml
in the same directory. Open it and place credentials there. Example below:
user: "user"
password: "password"
- This should cover basic integration with mail server. Now when you go to the Alerts UI module, you can choose Email method to send notification through email.
Note that the default notification is basically alert body, which is json constructed from a document that triggered the alert rule. In other words it might be ugly for untrained eye. If that's enough for you - great.
If you want you can define how email body will look like by adding additional functions in the alert definition.