Integrating uptime monitoring
Would you use an application that frequently goes down? No. When you create an application and users are using it, you need to make sure your service has maximum availability. The uptime SLA is crucial for every service to establish trust among users. In this section, we shall learn how we can monitor the uptime of our Django application by adding a health check endpoint to our automated monitoring system.
Adding a health check endpoint
django-health-check
(https://github.com/revsys/django-health-check) is a third-party package that can be easily added to any Django project to create an endpoint that can be monitored for uptime. Let us learn how to integrate django-health-check
into the Django project. To do so, follow these steps:
- Install
django-health-check
in our Django project by using the following code in our terminal:pip install django-health-check
- Now add
health_check
to DjangoINSTALLED_APPS
in thesettings.py
file:INSTALLED_APPS...