Page 1 of 1
Convert nrpe xinetd startup to a daemon nrpe
Posted: Wed Aug 07, 2019 10:46 am
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
Re: Convert nrpe xinetd startup to a daemon nrpe
Posted: Thu Aug 08, 2019 4:18 pm
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
Re: Convert nrpe xinetd startup to a daemon nrpe
Posted: Thu Aug 08, 2019 4:20 pm
by ssax
Yes, certainly possible.
Remove or disable this file:
- Before you delete note ALL of the values
You MAY need to remove the
5666/nrpe from
/etc/services as well.
Then:
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