Django HealthCheck

4.2.2 · active · verified Fri Apr 10

Django HealthCheck is a plug-and-play Django application that provides a /healthcheck/ endpoint to monitor the health of your Django app and its connected services like databases, caches, storage, Celery, and more. It returns HTTP 200 for healthy status and HTTP 500 if issues are detected. The current version is 4.2.2, and it maintains a regular release cadence with frequent updates and bug fixes.

Warnings

Install

Imports

Quickstart

To quickly integrate Django HealthCheck, add the 'health_check' core app and any desired `health_check.contrib.*` plugins to your `INSTALLED_APPS`. Then, include the health check URLs in your project's `urls.py`. Remember to install extra dependencies for specific checks (e.g., `psutil` for disk/memory checks).

# settings.py
INSTALLED_APPS = [
    # ... other Django apps ...
    'health_check',
    'health_check.db', # Checks database connection
    'health_check.cache', # Checks cache backend
    'health_check.storage', # Checks default file storage
    'health_check.contrib.psutil', # Checks disk/memory usage (requires psutil)
    'health_check.contrib.celery', # Checks Celery workers (requires celery)
    # Add more health_check.contrib.* apps as needed for your services
]

# urls.py
from django.urls import include, path

urlpatterns = [
    # ... other url patterns ...
    path('health/', include('health_check.urls')),
]

view raw JSON →