Convert nrpe xinetd startup to a daemon nrpe

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bcoleman310
Posts: 8
Joined: Fri May 08, 2015 6:24 am

Convert nrpe xinetd startup to a daemon nrpe

Post by bcoleman310 »

Is it possible to convert an existing installation of nrpe agent that uses xinetd for restart to be converted to a daemon that uses service nrpe restart/stop/start. This is for Redhat 6 and 7

Thanks,
B
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Convert nrpe xinetd startup to a daemon nrpe

Post by mbellerue »

Hello,

Does this accomplish what you're looking to do? I was able to copy this into a CentOS 7 box, at /etc/init.d, chmod +x the script, and then do /etc/init.d/nrpe start/stop/status.
https://exchange.nagios.org/directory/P ... pt/details
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Convert nrpe xinetd startup to a daemon nrpe

Post by ssax »

Yes, certainly possible.

Remove or disable this file:
- Before you delete note ALL of the values

Code: Select all

/etc/xinetd.d/nrpe
You MAY need to remove the 5666/nrpe from /etc/services as well.

Then:

Code: Select all

service xinetd restart
Create an init script to manage it:

This is the process I use:

EL6 and technically works on EL7

To create an NRPE init (sysv) script:

Code: Select all

wget https://github.com/NagiosEnterprises/nrpe/archive/master.zip
unzip master.zip
cd nrpe-master
./configure --with-init-type=sysv
make install-init
EL7

For the systemd unit file:

Code: Select all

wget https://github.com/NagiosEnterprises/nrpe/archive/master.zip
unzip master.zip
cd nrpe-master
./configure --with-init-type=systemd
make install-init
Let us know if you have any questions or if we can clarify anything for you.

To be super precise you should match your version of NRPE (the commands I use just do the latest master version, update yours accordingly but as long as the binary and config locations match, they should still work).

Code: Select all

https://github.com/NagiosEnterprises/nrpe/archive/nrpe-2-15.zip
Locked