Nagios install

Install Nagios Core 4 On Redhat/Centos

Nagios Core 4 is a free open source monitoring tool for monitor the devices like Network, Servers, Switch etc. It’s one of the most widely used monitoring tool. It’s pretty easy to install.

Types of Nagios Available :

1. Nagios XI : This monitors all mission-critical infrastructure components on any Operating system.

2. Nagios Log Server : This basically used for audit and system, security threats, identity trends and more.

3. Nagios Fuse : Multiple instances of Nagios Core 4 and XI for centralised Network view.

Note : You must have super privileges when you’re going to install the Nagios Core.

Let’s Begin Installation

You must have Selinux Disabled before installing the Nagios Core Server.

Go to the location for disable the SeLinux

Check Out : Nagios Service failed To Start

vim /etc/sysconfig/selinux

Selinux=disabled

To make it permanent, you will have to reboot the server.

Installation Of Nagios Core Server

Step 1: Install the require packages

yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip -y

Step 2: Now you need to create a user and group

useradd nagios

groupadd nagioscmd

Add these users in group nagioscmd,

usermod -a -G nagioscmd nagios

usermod -a -G nagioscmd apache

Step 3: Download the Nagios Server and plugins packages from here

Nagios Server 4 Download

Nagios Plugin 4 Download

After download, extract the packages

tar -zxf nagios-4.1.1.tar.gz

tar -zxf nagios-plugins-2.1.1.tar.gz

Step 4: Now go inside the nagios server 4

cd nagios-4.1.1

Run the below commands one by one when they get finish

./configure –with-command-group=nagioscmd

make all && make install && make install-init

make install-config && make install-commandmode

Now run this command for Web configuration

make install-webconf

Step 5: Now you need to create a user to login on Nagios Server, Create a file with below commands

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Step 6: Now you have to install the nagios plugins

cd /nagios-plugins-2.1.1

./configure –with-nagios-user=nagios –with-nagios-group=nagios –with-openssl

make all && make install

Now you need to restart the services of httpd and nagios,

systemctl start httpd

systemctl start nagios

Then try to access Nagios server with http:ip/nagios

if you face any issue in accessing, add port 80 in firewall

firewall-cmd –zone=public –add-port=80/tcp –permanent

firewall-cmd –reload

As you can see Nagios has been installed and running

You’re done

Leave a Reply

avatar
  Subscribe  
Notify of