In this chapter, we'll be creating a server status monitoring solution similar to Nagios. It is understandable if you have never heard of Nagios as it is not something that comes up in day-to-day conversations between web developers. In a nutshell, Nagios can tell you the status of your servers (which can be in the thousands) in one screen. You can configure alerts based on conditions, for example, if some critical server becomes unresponsive, so that you can be on top of problems before your users start to notice any service degradation. Nagios is an amazing piece of software that is used by millions of organizations around the world.
Our goal in this chapter is to create something similar, albeit very simple. Our Nagios clone, creatively named Djagios, will allow users to set up monitoring for simple stats from their servers. We will allow the monitoring of the following:
We will also be developing a web page where this data will be shown to the user in a nice tabular format. The user will also see an overview of how their servers are doing, and if any alerts are active on those systems.
Here are some of the things that we will be looking at in this chapter:
This chapter's code pack has a basic Django application setup with a SQLite database already configured. However, there isn't much code in the code pack because this chapter did not require user accounts or any other pre-existing setup. You can unzip the code pack, create a new virtual environment, activate it, and run the following commands from within the code folder to get up and running:
> pip install django > python manage.py migrate
18.218.239.182