Home » Categories » Multiple Categories

NRPE - Upgrading To NRPE v3 From Source

Upgrading To NRPE v3 From Source

This document explains what is required to upgrade to NRPE v3.

The actual commands required to upgrade do not differ much from the installation steps, hence this KB article is a guide as to what steps need to be followed in the installation documentation. The installation documentation can be found here:

Documentation - Installing NRPE v3 From Source

 

 

Prerequisites

Please follow the steps in the installation documentation, in an upgrade the steps are the same as an installation.

 

 

Downloading the Source

Please follow the steps in the installation documentation, in an upgrade the steps are the same as an installation.

 

 

Compile

NRPE will automatically compile for the user nagios and the group nagios. If you have previously configured NRPE to run with a different user/group then you will need to define these in the compile argument. 

The configure arguments are:

--with-nrpe-user=<user>       sets user name to run NRPE
--with-nrpe-group=<group>   sets group name to run NRPE
--with-nagios-user=<user>    sets user name for file permissions
--with-nagios-group=<grp>   sets group name file permissions

 

For example, if you had the user nrpe and the group nrpe the command would be as follows:

./configure --enable-command-args --with-nrpe-user=nrpe --with-nrpe-group=nrpe --with-nagios-user=nrpe --with-nagios-group=nrpe

 

 

Create User And Group

As explained in the previous step, NRPE will automatically compile for the user nagios and the group nagios. With this in mind, there is no need to run these steps as the user and group will already exist.

 

 

Install Binaries

Please follow the steps in the installation documentation, in an upgrade the steps are the same as an installation.

Please make sure you read the notes at the top of the "Install Binaries" section as it has some additional information you may require.

 

 

Install Configuration Files

 
CAUTION

If you run the make install-config it will overwrite your existing nrpe.cfg file, and custom commands / settings you have defined will be overwritten.

There is no need to run the make install-config command, the existing nrpe.cfg script is a valid configuration file and will allow NRPE to function after the upgrade.

There are newer security features of NRPE that allow certificates to be used between the check_nrpe plugin and the NRPE daemon. There are additional configuration files directives required in nrpe.cfg to enable these new features. There is a perl script called update-cfg.pl that will take a copy of your nrpe.cfg file and add the security directives to a new file called nrpe.cfg.new, for example:

/tmp/nrpe/update-cfg.pl /usr/local/nagios/etc/nrpe.cfg

 

Review the new file /usr/local/nagios/etc/nrpe.cfg.new to ensure the updated config file is correct (confirm the script did not remove any configurations). Then to implement the new script:

mv /usr/local/nagios/etc/nrpe.cfg /usr/local/nagios/etc/nrpe.cfg.original
mv /usr/local/nagios/etc/nrpe.cfg.new /usr/local/nagios/etc/nrpe.cfg

 

More information on the new security features of NRPE v3 can be found in this KB article:

Documentation - NRPE - v3 Enhanced Security

 

 

Update Services File

The /etc/services file should not need to be updated, the entry should already exist. You can confirm it does with the following command:

grep '5666/tcp' /etc/services

 

Which  should output the following:

nrpe    5666/tcp

 

If you get no output from the command then you should run the commands in the Update Services File section.

 

 

Install Service / Daemon

Previous versions of NRPE commonly used inetd or xinetd to start and stop the NRPE daemon. A fresh installation of NRPE v3 will create it's own service and no longer uses inetd/xinetd.

When performing an upgrade to NRPE v3, you have two options:

  • Stop using  inetd/xinetd

    • Stop the inetd/xinetd service

    • Copy the only_from = entries from the inetd/xinetd configuration file and place them to the /usr/local/nagios/etc/nrpe.cfg file in the allowed_hosts= directive

    • Remove the configuration file /etc/xinetd.d/nrpe to stop inetd/xinetd from trying to start the NRPE daemon

    • Start the inetd/xinetd service

    • Run the Install Service/Daemon steps

  • Continue using inetd/xinetd

    • Do not run the Install Service/Daemon steps

    • inetd/xinetd will continue to function as it normally does

 

 

Configure Firewall

Port 5666 is used by NRPE, because you already have a functioning NPRE installation then it can be assumed that the firewall is correctly configured (or turned off).

 

 

Update Configuration File

Because you already have a functioning NPRE installation then it can be assumed that the nrpe.cfg is already configured to your needs and this step can be skipped.

 

 

Start Service / Daemon

If you chose to continue using inetd/xinetd then these steps will not apply to you.

 

 

Test NRPE

Follow these steps to ensure that NRPE has been successfully upgraded.

 

 

Service / Daemon Commands

If you chose to continue using inetd/xinetd then these steps will not apply to you.

 

 

Installing The Nagios Plugins

Because you already have a functioning NPRE installation then it can be assumed that you already have the plugins installed and this step can be skipped. You can however follow the steps to update your existing plugins to a newer version.

 

 

Install check_nrpe Plugin Only

In some circumstances you may want to only install the check_nrpe plugin, usually required on your Nagios server. Follow the steps in this section, making sure to take into consideration the Compile information mentioned in this article.


 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

1.5 (2)
Article Rating (2 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Installing The AIX Agent
Viewed 1568 times since Wed, Jan 27, 2016
NRPE - Configuring NRPE Commands To Accept Arguments
Viewed 11023 times since Sun, Oct 15, 2017
NRPE - Turn Off XINETD Logging On Success
Viewed 2127 times since Tue, Mar 7, 2017
Nagios XI - How to Monitor Apache Cassandra Distributed Databases
Viewed 970 times since Thu, Jan 28, 2016
NRPE - How To Install NRPE v3 From Source
Viewed 58379 times since Fri, Jun 3, 2016
NRPE - v3 check_nrpe Config File
Viewed 4188 times since Fri, Jun 24, 2016
Nagios XI - Monitoring AIX With Nagios
Viewed 1189 times since Thu, Jan 28, 2016
NRPE - Packet Size Explained
Viewed 2545 times since Thu, Jun 30, 2016
NRPE - How to install NRPE
Viewed 23166 times since Wed, Dec 17, 2014
Nagios XI - Restarting A Linux Service With NRPE
Viewed 1048 times since Thu, Jan 28, 2016