Monitoring all my network with Centreon

Image


It's been a long time since the first time I heard about monitoring. It all started with my HNC project (which you can find on the "school projects" tab on the main page) when I had to use Nagios with a Raspberry Pi to monitor Cisco Equipment. Thanks to this HNC project, I found monitoring to be one of the most interesting and important things to have on a network, so I decided to monitor all my home equipment to learn more about monitoring and also to be alerted when something is not working as it should.



The first solution

My first home monitoring project was on a Raspberry Pi, using an image called NEMS (Nagios Entreprise Monitoring Linux) which can also be installed on a virtual machine. It is an image that comes with a ready-to-go Nagios interface and configuration utility. I started configuring everything and it was working well. But as I was adding more and more machines and services to monitor on my network, the Raspberry was starting to show its limits. That's why I bought an HP Elite machine with an SSD and more RAM to redo my monitoring. The utility that came to my mind was Centreon.



Centreon

I decided to install Centreon with the ISO they provide on their website. It is based on CentOS, which is also good for me because I'm more used to Debian-based systems, so having a RedHat based one would help me learn even more. The installation process was easy enough. Once it was booted I had to finalize the configuration on the web interface. As Centreon runs with Nagios, I had no troubles configuring it. The longest part was adapting the scripts and putting back everything together. I monitor everything via SNMPv2 and NRPE. I might upgrade to SNMPv3 for security concerns, but this is not planned yet.

On each machine I have, I've configured an SNMP agent so it can receive requests, and the same thing for NRPE. I chose these two utilities for two reasons. SNMP is widely used and cross-platform, and also well documented. Most of the scripts available online use this protocol to check machines. I chose NRPE also for its simplicity of use and configuration, but also because it runs the scripts on the remote machine. Thus, it is possible to have much more detailed results and check on more complicated system elements. NRPE is also secured, which means the connection from the server and client is encrypted, while with SNMPv2, the community string appears in clear.


Here's a list of what I monitor on my network :


Mail alerts

Once Centreon's configuration was done, all was left is to configure the mail alerts. On my previous monitoring project (NEMS) there was an integrated mail server that I could easily configure with its web interface. For the mails to work with Centreon, I had to install and configure a mail server called "Postfix". The mail address I use for sending the alters is a Gmail address. It was easy to configure, and now every alert and also recoveries are sent to my main mail account. Thanks to this, I know when there is a problem with a machine and I can fix it quickly. It also helps me being proactive because I can handle issues before they start to impact the network.



Here's the mails I receive :
When a host is down
Image



When a host is back up
Image



When a service is warning
Image



When a service is back as OK
Image