Checking Airflow Health Status¶
To check the health status of your Airflow instance, you can simply access the endpoint
"/health". It will return a JSON object in which a high-level glance is provided.
{
"metadatabase":{
"status":"healthy"
},
"scheduler":{
"status":"healthy",
"latest_scheduler_heartbeat":"2018-12-26 17:15:11+00:00"
}
}
The
statusof each component can be either “healthy” or “unhealthy”.- The status of
metadatabaseis depending on whether a valid connection can be initiated with the database backend of Airflow. - The status of
scheduleris depending on when the latest scheduler heartbeat happened. If the latest scheduler heartbeat happened 30 seconds (default value) earlier than the current time, scheduler component is considered unhealthy. You can also specify this threshold value by changingscheduler_health_check_thresholdinschedulersection of theairflow.cfgfile.
- The status of
The response code of
"/health"endpoint is not used to label the health status of the application (it would always be 200). Hence please be reminded not to use the response code here for health-check purpose.