{ "info": { "author": "Kristian Ollegaard", "author_email": "kristian@oellegaard.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Framework :: Django :: 2.2", "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Quality Assurance", "Topic :: System :: Logging", "Topic :: System :: Monitoring", "Topic :: Utilities" ], "description": "===================\ndjango-health-check\n===================\n\n|version| |coverage| |health| |license|\n\nThis project checks for various conditions and provides reports when anomalous\nbehavior is detected.\n\nThe following health checks are bundled with this project:\n\n- cache\n- database\n- storage\n- disk and memory utilization (via ``psutil``)\n- AWS S3 storage\n- Celery task queue\n- Celery ping\n- RabbitMQ\n- Migrations\n\nWriting your own custom health checks is also very quick and easy.\n\nWe also like contributions, so don't be afraid to make a pull request.\n\nUse Cases\n---------\n\nThe primary intended use case is to monitor conditions via HTTP(S), with\nresponses available in HTML and JSON formats. When you get back a response that\nincludes one or more problems, you can then decide the appropriate course of\naction, which could include generating notifications and/or automating the\nreplacement of a failing node with a new one. If you are monitoring health in a\nhigh-availability environment with a load balancer that returns responses from\nmultiple nodes, please note that certain checks (e.g., disk and memory usage)\nwill return responses specific to the node selected by the load balancer.\n\nSupported Versions\n------------------\n\nWe officially only support the latest version of Python as well as the\nlatest version of Django and the latest Django LTS version.\n\nInstallation\n------------\n\nFirst install the ``django-health-check`` package:\n\n.. code::\n\n pip install django-health-check\n\nAdd the health checker to a URL you want to use:\n\n.. code:: python\n\n urlpatterns = [\n # ...\n url(r'^ht/', include('health_check.urls')),\n ]\n\nAdd the ``health_check`` applications to your ``INSTALLED_APPS``:\n\n.. code:: python\n\n INSTALLED_APPS = [\n # ...\n 'health_check', # required\n 'health_check.db', # stock Django health checkers\n 'health_check.cache',\n 'health_check.storage',\n 'health_check.contrib.migrations',\n 'health_check.contrib.celery', # requires celery\n 'health_check.contrib.celery_ping', # requires celery\n 'health_check.contrib.psutil', # disk and memory utilization; requires psutil\n 'health_check.contrib.s3boto3_storage', # requires boto3 and S3BotoStorage backend\n 'health_check.contrib.rabbitmq', # requires RabbitMQ broker\n 'health_check.contrib.redis', # requires Redis broker\n ]\n\nNote : If using ``boto 2.x.x`` use ``health_check.contrib.s3boto_storage``\n\n(Optional) If using the ``psutil`` app, you can configure disk and memory\nthreshold settings; otherwise below defaults are assumed. If you want to disable\none of these checks, set its value to ``None``.\n\n.. code:: python\n\n HEALTH_CHECK = {\n 'DISK_USAGE_MAX': 90, # percent\n 'MEMORY_MIN': 100, # in MB\n }\n\nIf using the DB check, run migrations:\n\n.. code::\n\n django-admin migrate\n\nTo use the RabbitMQ healthcheck, please make sure that there is a variable named ``BROKER_URL``\non django.conf.settings with the required format to connect to your rabbit server. For example:\n\n.. code::\n\n BROKER_URL = amqp://myuser:mypassword@localhost:5672/myvhost\n\nTo use the Redis healthcheck, please make sure that there is a variable named ``REDIS_URL``\non django.conf.settings with the required format to connect to your redis server. For example:\n\n.. code::\n\n REDIS_URL = redis://localhost:6370\n\nSetting up monitoring\n---------------------\n\nYou can use tools like Pingdom_ or other uptime robots to monitor service status.\nThe ``/ht/`` endpoint will respond a HTTP 200 if all checks passed\nand a HTTP 500 if any of the tests failed.\n\n.. code::\n\n $ curl -v -X GET -H http://www.example.com/ht/\n\n > GET /ht/ HTTP/1.1\n > Host: www.example.com\n > Accept: */*\n >\n < HTTP/1.1 200 OK\n < Content-Type: text/html; charset=utf-8\n\n \n
| \n | CacheBackend | \nworking | \n
| \n | DatabaseBackend | \nworking | \n
| \n | S3BotoStorageHealthCheck | \nworking | \n