airflow系列教程(九) airflow的报警功能设置

10 篇文章 67 订阅 ¥9.90 ¥99.00
本教程详细介绍了如何在Airflow中设置报警功能,通过启用网易163的SMTP服务并配置Airflow的airflow.cfg文件,实现邮件通知。以测试任务test2触发的错误为例,展示了当任务执行失败时,如何接收到报警邮件。
摘要由CSDN通过智能技术生成

本人设置过程:邮件发送方:网易163   邮件接收方:qq邮箱

第一步:

开通网易163的smtp服务功能(百度so easy),并且获取授权码。

第二步:

设置airflow里的airflow.cfg配置文件如下例子:

[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 = smtp.163.com
smtp_starttls = True
smtp_ssl = False
# Uncomment and set the user/pass settings if you want to use SMTP AUTH
smtp_user = user@163.com
smtp_password = password  # 163邮箱配置的授权码
smtp_port = 25
smtp_mail_from = user@163.com

第三步:

编写作业

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数据指北Ai

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值