gitruhul opened a new issue, #22895: URL: https://github.com/apache/airflow/issues/22895
### Apache Airflow version 2.2.4 ### What happened The health endpoint of airflow (base_url/health) is always returning 200 in all the scenarios (healthy+unhealthy). Same information is mentioned [here](https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/check-health.html?msclkid=33d4cc33b96611ec8aea45c673e864e7) that `Please keep in mind that the HTTP response code of /health endpoint should not be used to determine the health status of the application. The return code is only indicative of the state of the rest call (200 for success).` Scenario-1: (Scheduler and Metadatabase are healthy) - Status Code = 200 ``` { "metadatabase": { "status": "healthy" }, "scheduler": { "latest_scheduler_heartbeat": "2022-04-07T13:13:41.102804+00:00", "status": "healthy" } } ``` Scenario-2: (Scheduler is unhealthy) - Status Code = 200 ``` { "metadatabase": { "status": "healthy" }, "scheduler": { "latest_scheduler_heartbeat": "2022-04-07T13:13:41.102804+00:00", "status": "unhealthy" } } ``` The only way to get unhealthy information is by parsing the JSON response. ### What you think should happen instead The status code of scenario-2 (Something is unhealthy) should return a status code other than 200. ### How to reproduce Install airflow and hit the URL base_url/health ### Operating System Linux ### Versions of Apache Airflow Providers _No response_ ### Deployment Docker-Compose ### Deployment details _No response_ ### Anything else _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
