a pluggable app that runs a full check on the deployment, using a number of plugins to check e.g. database, queue server, celery processes, etc.
Python HTML
Latest commit ddf1960 Dec 4, 2016 @aleksihakli aleksihakli committed with codingjoe Add missing coding tags for UTF-8 compatibility
Close #65



version ci coverage health license

This project checks the health for a number of backends and sees if they are able to connect and do a simple action. For example, check out the Django ORM backend:

class DjangoDatabaseBackend(BaseHealthCheckBackend):
    def check_status(self):
            obj = TestModel.objects.create(title="test")
            obj.title = "newtest"
            return True
        except IntegrityError:
            raise ServiceReturnedUnexpectedResult("Integrity Error")
        except DatabaseError:
            raise ServiceUnavailable("Database error")

The project is made using some of the same plugin code that the Django admin site uses - so when you have successfully written a new plugin, you register it to the pool, e.g.



Add this to urls.py

url(r'^ht/', include('health_check.urls'))

Add required apps:


Remember to add dependencies, for example djcelery for Celery. You should have that already, if you have Celery running. You'll also have to make sure that you have a result backend configured.

If you are using Celery 3, use the health_check_celery3 application instead of health_check_celery.

Set up monitoring

E.g. add to pingdom - django-health-check will return HTTP 200 if everything is OK and HTTP 500 if anything is not working.


Django 1.4+