【发布时间】:2019-02-05 07:31:01
【问题描述】:
我是否必须进行任何其他设置才能让 apache-airflow 向我发送有关任务失败的电子邮件。我的配置文件中有以下内容(未更改默认值):
[email]
email_backend = airflow.utils.email.send_email_smtp
[smtp]
# If you want airflow to send emails on retries, failure, and you want to use
# the airflow.utils.email.send_email_smtp function, you have to configure an
# smtp server here
smtp_host = localhost
smtp_starttls = True
smtp_ssl = False
# Uncomment and set the user/pass settings if you want to use SMTP AUTH
# smtp_user = airflow
# smtp_password = airflow
smtp_port = 25
smtp_mail_from = airflow@example.com
在我的任务中,我有
'email': ['my.email@domain.co.uk'],
'email_on_failure': True,
但是当任务失败时它不会给我发送电子邮件。
我已经看到了这个问题:How do I setup Airflow's email configuration to send an email on errors?,但我真的不明白要从中采取什么行动。我只是在寻找气流发送电子邮件之前需要做什么的基础知识。我是否必须配置我自己的 smtp 服务器,还是应该直接使用?
我在 CentOS 上运行 apache-airflow 1.9.0
【问题讨论】: