Table of Contents
First, install the django-healthy package:
pip install django-healthyIn your settings.py, configure HEALTH_CHECK_BACKENDS with your desired indicators.
HEALTH_CHECK_BACKENDS = {
"cache": {
"BACKEND": "healthy.backends.CacheHealthBackend",
},
"db": {
"BACKEND": "healthy.backends.DatabasePingBackend",
},
}Lastly, add django-healthy's routes to your urls.py:
path("", include("healthy.urls")),This adds two routes:
/ping//health/
django-healthy is distributed under the terms of the MIT license.