Skip to main content

Simple Django health check

Project description

django-simple-health-check

GitHub Actions PyPI PyPI - Python Version framework - Django PyPI - Django Version PyPI - License

Simple Django health check

Inspired by:

Installation

$ pip install django-simple-health-check

Use pip install django-simple-health-check[psutil] for using simple_health_check.checks.ps.* checks.

Quick start

  1. Install the package

  2. Add simple_health_check to your INSTALLED_APPS settings like this:

INSTALLED_APPS = [
    ...,
    'simple_health_check',
    ...,
]
  1. Add simple_health_check.urls to main urls.py:
from django.urls import path, include

urlpatterns = [
    ...,
    path('', include('simple_health_check.urls')),
    ...,
]
  1. Configure the readiness checks:
SIMPLE_HEALTH_CHECKS = {
    'simple_health_check.checks.migrations.Migrations': [
        dict(alias='default'),
        dict(alias='db2'),
    ],
    'simple_health_check.checks.db.Databases': None,

    # The simplest way to add your own check
    'your_package.path_to_checks.SomeCheck': {...} or [{...}, ...] or None,
}

by default

SIMPLE_HEALTH_CHECKS = {
    'simple_health_check.checks.migrations.Migrations': None,  # check all aliases
    'simple_health_check.checks.db.Databases': None,  # check all aliases
}

Built-in checks

A check Built-in/expected
simple_health_check.checks.db.Databases :heavy_check_mark:
simple_health_check.checks.migrations.Migrations :heavy_check_mark:
simple_health_check.checks.caches.CacheBackends :heavy_check_mark:
simple_health_check.checks.ps.DiskUsage :heavy_check_mark:
simple_health_check.checks.ps.MemoryUsage :heavy_check_mark:
simple_health_check.checks.dummy.DummyTrue :heavy_check_mark:
simple_health_check.checks.dummy.DummyFalse :heavy_check_mark:
emails :hourglass_flowing_sand:
queues :hourglass_flowing_sand:
storages :hourglass_flowing_sand:

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-simple-health-check-0.6.1.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page