potiuk commented on issue #36516:
URL: https://github.com/apache/airflow/issues/36516#issuecomment-1873240412

   > One possible option could be to publish the DAG state metric. Consumers 
can monitor the DAG's last state from the metrics and create alerts around it. 
However, this option doesn't provide a reaction to the state change.
   
   Correct - my initial proposal in the discussion is active checking via API - 
metrics is almost the same but we would have to have *something* gathering and 
publishing the metrics regularly (still you'd have to monitor the metrics and 
react). In order to implement this one you'd have to have something regularly 
checking state of DAGs. 
   
   One of the options would be to build it in DAGFileProcessor. It already 
parses all dags regularly, so if we store state observed during last parsing, 
DAGFileProcessor could fire a notification when the state changed from last 
parsing. A bit racy approach and would have to be carefully done to account for 
potential state changes while the file is being parsed, but generally doable I 
think.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to