Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Adds some common health check endpoints (ping, time, status)

Project Description

Django-Health-Checks

Django-Health-Checks is Django plugin which adds a few health check endpoints (ping, time, and status) to the Django project.

Add health_checks to your settings.py INSTALLED_APPS

INSTALLED_APPS += ('health_checks',)

Add health_checks urls

import health_checks

urlpatterns += [
    url('r^', include('health_checks.urls')),
]

Add some custom status jobs

from health_checks import status_job

@status_job(name="PostgreSQL", timeout=5)
def postgresql():
    # Perform a ping/query to Postgres

@status_job
def facebook
    # Ping some Facebook service.
You now have the below endpoints:
  • /ping/ (returns a 200 “pong”)

  • /time/

    {
      "epoch": 1.463770977e+09,
      "local": "2016-05-20T19:02:57.558686471Z",
      "offset": 0,
      "utc": "2016-05-20T19:02:57.558686471Z",
      "zone": "UTC"
    }
    
  • /status/

    {
      "endpoints": [
        {
          "duration": 0.028509,
          "endpoint": "PostgreSQL"
        }, {
          "duration": 0.018747,
          "endpoint": "facebook",
          "error": "socket.gaierror: [Errno -2] Name or service not known"
        },
        ...
    }
    

get Django-Health-Checks

Install django

easy_install django-health-checks
or
pip install django-health-checks

Download the latest release from Python Package Index or clone the repository

Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Django-Health-Checks-0.0.1.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source May 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting