epoch8 / airflow-exporter

Airflow plugin to export dag and task based metrics to Prometheus.
Other
240 stars 75 forks source link

Add airflow_dag_last_status #96

Closed nvn01234 closed 3 years ago

nvn01234 commented 3 years ago

Related to PR69, follow the comment of @elephantum

nvn01234 commented 3 years ago

Hypotheses: Maybe it'll be more straight forward to add airflow_dag_last_status{status="xxx"} = 0/1 ?

What about if we add airflow_last_dagrun_status(...) = -1/0/1

elephantum commented 3 years ago

@nvn01234 I updated your PR to the latest version of code, can you please check that everything works?

nvn01234 commented 3 years ago

Nice, it worked. Result look like this:

image

I also consider to add airflow_last_dagrun_task_status (tasks's status of the last dagrun for each dag), will submit another PR later.

elephantum commented 3 years ago

I renamed metric for consistency.

nvn01234 commented 3 years ago

I changed the PR title too