Released:
Prometheus Exporter for Airflow Metrics
The Airflow Prometheus Exporter exposes various metrics about the Scheduler, DAGs and Tasks which helps improve the observability of an Airflow cluster.
The exporter is based on this prometheus exporter for Airflow.
I'm currently running an airflow (1.9.0) instance on python 3.6.5. I have a manual workflow that I'd like to move to a DAG. This manual workflow now requires code written in python 2 and 3. This video shows the usage of the F&P Airvo™ 2 Humidified High Flow System & Optiflow Nasal High Flow therapy in different departments of the Royal Berkshire Hospital in Reading, UK. It shows the benefits they have found both to the patients and hospital since its introduction. (3 minutes) Find out more about Optiflow therapy.
The plugin has been tested with:
The scheduler metrics assume that there is a DAG named canary_dag
. In our setup, the canary_dag
is a DAG which has a tasks which perform very simple actions such as establishing database connections. This DAG is used to test the uptime of the Airflow scheduler itself.
The exporter can be installed as an Airflow Plugin using:
pip install airflow-prometheus-exporter
This should ideally be installed in your Airflow virtualenv.
Metrics will be available at
http://<your_airflow_host_and_port>/admin/metrics/
airflow_task_status
Number of tasks with a specific status.
All the possible states are listed here.
airflow_task_duration
Duration of successful tasks in seconds.
airflow_task_fail_count
Number of times a particular task has failed.
airflow_xcom_param
value of configurable parameter in xcom table
xcom fields is deserialized as a dictionary and if key is found for a paticular task-id, the value is reported as a guage
Add task / key combinations in config.yaml:
a task_id of 'all' will match against all airflow tasks:
airflow_dag_status
Number of DAGs with a specific status.
All the possible states are listed here
airflow_dag_run_duration
Duration of successful DagRun in seconds.
airflow_dag_scheduler_delay
Scheduling delay for a DAG Run in seconds. This metric assumes there is a canary_dag
.
The scheduling delay is measured as the delay between when a DAG is marked as SCHEDULED
and when it actually starts RUNNING
.
airflow_task_scheduler_delay
Scheduling delay for a Task in seconds. This metric assumes there is a canary_dag
.
airflow_num_queued_tasks
Number of tasks in the QUEUED
state at any given instance.
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size airflow_prometheus_exporter-1.0.8-py3-none-any.whl (8.7 kB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size airflow_prometheus_exporter-1.0.8.tar.gz (6.2 kB) | File type Source | Python version None | Upload date | Hashes |
Algorithm | Hash digest |
---|---|
SHA256 | 154f238177a866d03d2c0581e0a6ef939b2032a83db4910f80b384c5d5d8ec82 |
MD5 | b3f4bcaebe20c89b15a71cf03550c34f |
BLAKE2-256 | d050ecd869b1e06130cc8abf78f59cd6b58fd43ef65e42a695a59be3d2b0bc47 |
Algorithm | Hash digest |
---|---|
SHA256 | ac6f41c0c23e00e9f8c12a97330fd91220ddc84485460882f18c0df02d3d696f |
MD5 | 49c4897af3bd928c31eddee0ffd20b94 |
BLAKE2-256 | 2b6aba5031cd8b10f9ed8cdc6915c2ec2366770a74268f7f8af367e412bb9040 |