• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How To Install NRPE on LinuxMint 19/18

Written by Rahul, Updated on December 6, 2018

NRPE stands for Nagios Remote Plugin Executor, is used for executing Nagios plugins on remote client systems. In previous article we had described about installation of Nagios Server on Ubuntu operating system. This article will help you to install NRPE on LinuxMint 19 and Linux mint 18 systems.

Install NRPE

Step 1 – Installing NRPE

NRPE is available under default apt repositories of Ubuntu systems. Execute the following command to install it

sudo apt-get update
sudo apt-get install nagios-nrpe-server nagios-plugins

Step 2 – Configure NRPE

In NRPE configuration, first we need to nrpe to which nagios servers it accepts requests, For example your nagios server ip is 192.168.1.100, then add this ip to allowed hosts list. Edit NRPE configuration file /etc/nagios/nrpe.cfg and make changes like

/etc/nagios/nrpe.cfg
 allowed_hosts=127.0.0.1, 192.168.1.100

we can add more Nagios servers in allowed hosts by comma separated list.

Now restart NRPE service. Now its ready to listen to requests from Nagios server

sudo /etc/init.d/nagios-nrpe-server restart

Step 3 – Verify Connection

Let’s verify the connection between the Nagios server and NRPE client machine. Login to your Nagios server and check the Nagios server can communicate with NRPE service properly.

Use check_nrpe command on Nagios server under plugins directory. The command will be like as below here 192.168.1.110 is the IP address of client machine.

check_nrpe -H 192.168.1.110

NRPE v2.15

The output “NRPE v2.15” shows that the Nagios server successfully communicated with NRPE.

Step 4 – Add Check Commands in NRPE

All the services check commands with the nagios plugins packages, which is by default installed in /usr/lib/nagios/plugins/ for 32 bit systems. Default installation adds few commands in configuration file. Add more commands as per your requirements like below

vim /etc/nagios/nrpe.cfg
/etc/nagios/nrpe.cfg
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_sda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1
command[check_sda2]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda2
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200

Step 5 – Start/Stop NRPE Service

Use following commands to start, stop or restart NRPE service. Each time we make any changes in configuration file required to restart service

sudo /etc/init.d/nagios-nrpe-server stop
sudo /etc/init.d/nagios-nrpe-server start
sudo /etc/init.d/nagios-nrpe-server restart

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy