Skip to content

Example DAGs demonstrating how to implement alerting and notifications via Slack

Notifications You must be signed in to change notification settings

aspain/airflow-slack-callbacks

 
 

Repository files navigation

Airflow Callbacks

Showcasing several ways to implement Airflow callbacks and notifications via Slack.

Note: DAGs and functions in the /dags/new_version and /include/new_version/ directories have been updated to Slack Provider 8.0.0 requirements. Those in the /old_version directories are now outdated and may not work as expected.

Description

Monitoring tasks and DAGs at scale can be cumbersome. Sometimes you'd like to be notified of certain events, and not others. These DAGs cover several methods of implementing custom Slack notifications, so you can be confident you aren't missing critical events that may require immediate attention.

Slack Callback Examples

Example Callbacks

Getting Started

Dependencies

To implement notifications via Slack, add the following to your requirements.txt:

apache-airflow-providers-slack
apache-airflow-providers-http

Installing

In order to run these demos on your localhost, be sure to install:

Executing demos

Clone this repository, then navigate to the cs-tutorial-slack-callbacks directory and start your local Airflow instance:

astro dev start

In your browser, navigate to http://localhost:8080/

  • Username: admin

  • Password: admin

Setting up Slack Connections in Airflow

In order to receive callback notifications, you must also create your webhooks and set up your connections in the Airflow UI. Follow the instructions found in the Appendix section of the accompanying slide deck to create these.

Additional Resources

About

Example DAGs demonstrating how to implement alerting and notifications via Slack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Dockerfile 0.1%