Dan*_*Dan 4 email smtp airflow
我是否必须进行任何其他设置才能让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
Run Code Online (Sandbox Code Playgroud)
在我的任务中,我有
'email': ['my.email@domain.co.uk'],
'email_on_failure': True,
Run Code Online (Sandbox Code Playgroud)
但是当任务失败时,它不会向我发送电子邮件.
我已经看到了这个问题:如何设置Airflow的电子邮件配置以发送有关错误的电子邮件?但我真的不明白从中采取什么行动.我只是在寻找气流发送电子邮件之前需要做什么的基础知识.我是否必须配置自己的smtp服务器,还是应该可以解决这个问题?
我在CentOS上运行apache-airflow 1.9.0
您将需要自己的SMTP服务.我们在内部使用Mailgun和Sendgrid,效果很好.你只需要用.cfg
你的凭据更改你的那些行,重新启动气流,你应该好好去!
归档时间: |
|
查看次数: |
2112 次 |
最近记录: |