Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Python

Kiểm tra hệ thống Django tại runtime (health check)


django-watchman cung cấp endpoint /watchman/dashboard/ kiểm tra database, cache, storage... phù hợp production monitoring.

Cài đặt

  1. pip install django-watchman

  2. Thêm 'watchman' vào INSTALLED_APPS.

  3. URL: path('watchman/', include('watchman.urls'))

Kết quả

Truy cập /watchman/dashboard/ → bảng trạng thái: DB OK, Cache OK, Disk space... dùng cho load balancer health check.