Metadata-Version: 2.0
Name: django-healthchecks
Version: 1.3.0
Summary: Simple Django app/framework to publish health checks
Home-page: https://github.com/mvantellingen/django-healthchecks
Author: Michael van Tellingen
Author-email: michaelvantellingen@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.7
Classifier: Framework :: Django :: 1.8
Classifier: Framework :: Django :: 1.9
Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: Django (>=1.7)
Requires-Dist: six (>=1.1)
Provides-Extra: docs
Requires-Dist: sphinx (>=1.4.0); extra == 'docs'
Provides-Extra: test
Requires-Dist: coverage (==.4.2); extra == 'test'
Requires-Dist: pytest (==3.0.5); extra == 'test'
Requires-Dist: pytest-django (==3.1.2); extra == 'test'
Requires-Dist: isort (==4.2.5); extra == 'test'
Requires-Dist: flake8 (==3.0.3); extra == 'test'
Requires-Dist: flake8-blind-except (==0.1.1); extra == 'test'
Requires-Dist: flake8-debugger (==1.4.0); extra == 'test'

===================
django-healthchecks
===================

Simple Django app/framework to publish health check for monitoring purposes

Status
======
.. image:: https://travis-ci.org/mvantellingen/django-healthchecks.svg?branch=master
    :target: https://travis-ci.org/mvantellingen/django-healthchecks

.. image:: http://codecov.io/github/mvantellingen/django-healthchecks/coverage.svg?branch=master 
    :target: http://codecov.io/github/mvantellingen/django-healthchecks?branch=master

.. image:: https://img.shields.io/pypi/v/django-healthchecks.svg
    :target: https://pypi.python.org/pypi/django-healthchecks/

Installation
============

.. code-block:: shell

   pip install django_healthchecks

Usage
=====

Add the following to your urls.py:


.. code-block:: python

    url(r'^healthchecks/', include('django_healthchecks.urls')),

Add a setting with the available healthchecks:

.. code-block:: python

    HEALTH_CHECKS = {
        'postgresql': 'django_healthchecks.contrib.check_database',
        'cache_default': 'django_healthchecks.contrib.check_cache_default',
        'solr': 'your_project.lib.healthchecks.check_solr',
    }

By default the status code is always 200, you can change this to something
else by using the `HEALTH_CHECKS_ERROR_CODE` setting:


.. code-block:: python

    HEALTH_CHECKS_ERROR_CODE = 503


You can also add some simple protection to your healthchecks via basic auth.
This can be specified per check or a wildcard can be used `*`.

.. code-block:: python

    HEALTH_CHECKS_BASIC_AUTH = {
        '*': [('admin', 'pass')],
        'solr': [],
    }


