Running Nagios Core 4.1.1. on CentOS 7

This is the latest post on how to install Nagios Core 4.1.1. on latest CentOS 7.2 linux. Nagios is well known as a great monitoring tool which can be quite scalable and really undemanding from resource point of view. Nagios configuration can be a bit mind boggling at first, but gets easier after some usage. Nagios is very customizable in every point of view from monitoring checks to alert messaging and more.

Nagios Core is the free DIY version while student, pro and business versions offer additional features and licenses also.

Running Nagios Core 4.1.1. on CentOS 7

The following tutorial was written and tested on up to date CentOS Linux release 7.2.1511 (Core) minimal installation with SELinux and FirewallD service turned on.

1. Download and Unpack Nagios Core 4.1.1.

You can download Nagios Core 4.1.1. to your CentOS with wget. Visit Nagios webpage and go to downloads section. Nagios Core is freely available for download. Once downloaded unpack it and move it to the desired directory.

Since i am running CentOS 7 64bit minimal installation i’m missing the wget package, but this can easily be installed with “yum install wget”. Unpacking should not be a problem even if you are running minimal install.

3. Take care of Nagios User and Group

We need to create a user “nagios” and group “nagcmd” to be used for running Nagios Core 4.1.1. instance. The user “nagios” must be added to “nagcmd” group.
Run the following commands to make this happen.

Once that is done change the ownership of the nagios-4.1.1 folder from Step 1 to “nagios” user and “nagcmd” group.

Do note the “-R” parameter used. It is taking care of recursive ownership change for all files and folders within nagios-4.1.1 folder.

4. Configure and Install Nagios Core 4.1.1.

Move to the nagios-4.1.1 folder to run the required “configure” and “make install” commands. The “configure” command will let installation process know we want to use “nagcmd” group for Nagios related files and processes.