Get a response json reflecting the current status of the site.
- Install the package
python setup.py
- Go to
setting.py
and addya-dancer
to your installed app:
INSTALLED_APPS = (
'ya_dancer',
)
- Go to the main
urls.py
of your project and add the following:
url(r'^health-check-status/', include('ya_dancer.urls')),
You need to go to the health-check-status/
relative url, you should get a JSON response like:
{"app_status": "ok", "db": "ok"}
- To check app status:
health-check-status/app/
response:
{"app_status": "ok"}
- To check database status:
health-check-status/db/
response:
{"db": "ok"}
requires mongoengine
To check mongodb:
health-check-status/mongodb/
or with other status checks:
health-check-status/?mongodb=1
response:
{"mongo_db": "ok"}
CHECK IT MATE !