Giter Site home page Giter Site logo

pikhovkin / django-simple-health-check Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 37 KB

Simple Django health check

License: MIT License

Python 100.00%
health-check healthcheck healthchecks health-checks monitoring ping django-health-check django readiness liveness

django-simple-health-check's Introduction

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 ✔️
simple_health_check.checks.migrations.Migrations ✔️
simple_health_check.checks.caches.CacheBackends ✔️
simple_health_check.checks.ps.DiskUsage ✔️
simple_health_check.checks.ps.MemoryUsage ✔️
simple_health_check.checks.dummy.DummyTrue ✔️
simple_health_check.checks.dummy.DummyFalse ✔️
emails
queues
storages

License

MIT

django-simple-health-check's People

Contributors

lerela avatar pikhovkin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.