Simple Django app/framework to publish health checks
Project description
Simple Django app/framework to publish health check for monitoring purposes
Status
Installation
pip install django_healthchecks
Usage
Add the following to your urls.py:
url(r'^healthchecks/', include('django_healthchecks.urls')),
Add a setting with the available healthchecks:
HEALTH_CHECKS = {
'postgresql': 'django_healthchecks.contrib.check_database',
'cache_default': 'django_healthchecks.contrib.check_cache_default',
'solr': 'your_project.lib.healthchecks.check_solr',
}
You can also include healthchecks over http. This is useful when you want to monitor if depending services are up:
HEALTH_CHECKS = {
...
'my_microservice': 'https://my-service.services.internal/healthchecks/',
...
}
By default, http health checks will time out after 500ms. You can override this as follows:
HEALTH_CHECKS_HTTP_TIMEOUT = 0.5
By default the status code is always 200, you can change this to something else by using the HEALTH_CHECKS_ERROR_CODE setting:
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 *.
HEALTH_CHECKS_BASIC_AUTH = {
'*': [('admin', 'pass')],
'solr': [],
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-healthchecks-1.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea399e4f7c6e1b4a95d5754ad2da2bc0ee678f3c4a62f4c890a257d53e13ac7 |
|
MD5 | f4f7a5d705d20c456ba540aee4080c3b |
|
BLAKE2b-256 | c416bd87efa31f06627fe26087e840e572f3dc13f37f50ec62d31a50ddc800e5 |
Hashes for django_healthchecks-1.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a98e895a9639c1877687dac1284fc834d34d846a7e40160dfb2ff9381d241edf |
|
MD5 | 790c4c23e0c949d5f705d0f9e5d842d4 |
|
BLAKE2b-256 | 48294176a999b163d119435bf085f51228248b556ed66922f50340db917d8103 |