Monitoring the Mesos cluster using Nagios
Monitoring is a vital part of keeping the infrastructure up and running. Mesos integrates well with the existing monitoring solutions and has plugins for most monitoring solutions, such as Nagios. This module will give you a walkthrough of how to install Nagios on your cluster and enable monitoring to send you e-mail alerts whenever something goes wrong in your cluster.
Installing Nagios 4
The first thing we need to do before installing Nagios is to add an Nagios user to the system from which the Nagios process can run and send out alerts. We can create a new user and a new usergroup for Nagios by executing the following commands:
$ sudo useradd nagios $ sudo groupadd nagcmd $ sudo usermod -a -G nagcmd nagios
Here, we created a user, Nagios, and a user group, nagcmd
, which is assigned to the user Nagios in the third command listed before.
Now, install the dependency packages with the following command:
$ sudo apt-get install build-essential libgd2-xpm...