monitoring tool

how to add linux host to nagios monitoring server

In the first article, we have explained how to install and configure Nagios core on Amazon Linux Server. In this blog, we will show you how to add Linux host to Nagios monitoring server using nrpe plugin. Assuming you have already installed Nagios Server and running properly, if not please check Step By Step method for installing Nagios in Amazon Linux Once you have setup/installed Nagios Monitoring Server. Now you are ready to add remote Linux host for monitoring. Steps on Remote Linux Host which you want to monitor in Nagios monitoring server.

Install NRPE Add-on and Nagios Plugins on remote Linux host:
Add Nagios servers IP address, separated by comma as mention below.

Configure Nagios Monitoring Checks:

How to monitor CPU usage, disk usage and total process in Nagios monitoring server. In this example, we will monitor Root Partition, Another disk usage like /mnt (additional disk), CPU load, User logged in, Total processes Login to your Linux host and edit nrpe.cfg file

#Note: In the above command definition -w stands for warning and -c stands for critical

Verify Nagios plugin:

Command to start nrpe service on Linux host:

Auto start nrpe service after reboot on Linux host:

Steps to be done on Nagios Monitoring Server Login to your Nagios Monitoring Server.

Steps to Install NRPE Plugins on Nagios Server

Verify NRPE plugins can communicate with your remote Linux host
You will get output with NRPE version which is installed on a remote Linux host Tip:

  • Make sure your firewall allows the communication between remote Linux host and Nagios monitoring host (vice versa)
  • Check NRPE plugins installed properly with all dependency

How to add remote Linux host to Nagios Monitoring Server

Login to your Nagios monitoring server Step 1: Uncomment below the line in “nagios.cfg” file, Here we specify the location of all your remote host file.

Step 2:  Update/Add host definition in “templates.cfg”

Step 3: Create service file in “/usr/local/nagios/etc/servers/” and add below lines in that. Eg: Monitor Linux host with CPU load, Users, process, disk usage.

NRPE Command definition needs to add in “command.cfg” file

Now test/verify Nagios configuration file for any errors in Nagios Server:

Now reload your Nagios configuration.

Commands to restart or reload Nagios service

From all these steps you have added remote Linux host in Nagios monitoring server. Now goto Nagios monitoring web interface at http:///nagios and provide username and password and check now the Linux host added and it is monitoring in Nagios Monitoring Server. This is how to add Linux host to Nagios monitoring server using nrpe plugin.


Read this also:

Simple Steps for Installing Munin Monitoring Tool

Steps to install Nagios in Amazon linux

Add remote server in Nagios

Related Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Adblock Detected

Please consider supporting us by disabling your ad blocker
%d bloggers like this: