Step To Install Linux Host In Nagios Server On CentOS 7

Step To Install Linux Host In Nagios Server

Nagios is an Open-source monitoring tool that is widely used. We’ve already installed Nagios core if you do not know how to install, You may visit our previous post and step to install Linux host in Nagios.

We can monitor any server, Network devices, and Applications using Nagios Server. This is an Open Source monitoring Tool for IT Infrastructure and this also comes in Enterprise Version.

Check Out:  Install Nagios Core

  1. Nagios Server Ip is 192.168.185.128

2. Remote Host IP is 192.168.185.129

Let’s Begin Installation

Configuration Nagios for Remote Host

Step 1: Download the Epel repository because nrpe plugins are not available in RedHat repository.

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Step 2: Install NRPE plugin

yum install -y nrpe nagios-plugins-all

After installing, now you need to edit the nrpe.cfg file to accept the connection from the Nagios server.

Check Out:  Nagios Service failed To Start

vim /etc/nagios/nrpe.cfg

Step 3: You may check Nagios Command which is by default defined in /etc/nagios/nrpe.cfg

-w stands for warning and -c stands for critical

if you want you can test it with the below commands, In my case it’s installed on the below location.

/usr/lib64/nagios/plugins/check_procs -w 150 -c 200

Step 4: Now start and enable the nrpe service

systemctl start nrpe && systemctl enable nrpe

Configuration on Nagios Server

Step 5: Install NRPE pluginss

yum -y install nagios-plugins-nrpe

Now come to vim /usr/local/nagios/etc/nagios.cfg

These are already uncommented, you can do more according to your need

Step 6: You may check some commands on this location

vim /usr/local/nagios/etc/objects/commands.cfg

cd /usr/local/nagios/etc/objects

touch server.cfg

Copy the all content of localhost.cfg to server.cfg

Replace hostname, alias, and address with your remote host configuration

Step 7: After all these, if you want you can run to check for error in the configuration file

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Step 8: Start the Nagios service

systemctl restart nagios

vim /usr/local/nagios/etc/objects/server.cfg

Step 9: You can change the host-name for all the services which are defined in this file.

systemctl restart nagios

Visit the Nagios server

Check Host

Check all Services

You’re done

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment