Page 1 of 1

NRPE Install on RHEL 4

Posted: Thu Sep 04, 2014 2:37 pm
by AMacintosh
We are required to install NRPE on a number of RHEL 4 machines. We have noticed that there are multiple documents outlining how to install NRPE on RHEL 4 but the docs are all different and we are a bit confused. Does anybody have a document that we can follow that would show the correct steps?

We would also like to have a backout plan for uninstalling NRPE if the agent installation breaks something.

Is there a list of the packages that get installed and the changes that are made during the install so that we can see if it will break anything?

Thanks,

Re: NRPE Install on RHEL 4

Posted: Thu Sep 04, 2014 3:18 pm
by lmiltchev
I would recommend following this document:

http://assets.nagios.com/downloads/nagi ... _Agent.pdf

This is the easiest method. Our installer will take care of installing NRPE, and nagios plugins. Also, the NRPE will be configured in a way that is compatible with our wizards.

If for some reason the install fails (RHEL 4 is quite old), you can try installing nagios plugins on the server, then compiling NRPE from source. You can follow this document (if you decide to go this route):

http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf

Re: NRPE Install on RHEL 4

Posted: Mon Sep 15, 2014 9:25 am
by AMacintosh
Thanks for the reply. What about backing out of a install that interferes with an application? Is there an easy way to backout of an NRPE install?

Re: NRPE Install on RHEL 4

Posted: Mon Sep 15, 2014 9:56 am
by slansing
What do you mean? Stopping it mid installation? That would typically be done by running:

Code: Select all

CTRL+C
On the shell, you will want to take a look at what was already installed/added by the script and remove it manually.

Re: NRPE Install on RHEL 4

Posted: Tue Sep 16, 2014 10:57 am
by AMacintosh
I mean if we realize after the install, that an application has been affected how do we rollback the install completely like we never installed it.

Re: NRPE Install on RHEL 4

Posted: Tue Sep 16, 2014 11:04 am
by lmiltchev
We don't have an "uninstall script", but you could do the following:

Code: Select all

delgroup nagios
deluser nagios
rm -f /etc/xinet.d/nrpe
service xinetd restart
rm -rf /usr/local/nagios
provided you no longer need nagios on the client.

Re: NRPE Install on RHEL 4

Posted: Wed Sep 17, 2014 11:09 am
by AMacintosh
The install worked on RHEL 4 but we have a few concerns that I'm hoping you could clear up for us.


1.) The daemon seems to be configured under xinetd which means it is running as root. Is there a better method which would register NRPE as a service running as nagios?
2.) There is a nagcmd group created along with a nagios group. What are the functions of each?
3.) The nrpe.cfg under /usr/local/nagios/etc/nrpe.cfg doesn't appear to be the active configuration file. It seems to be the nrpe.cfg found under xinetd. Is this correct?
4.) ndo2db 5668/tcp seems to be configured under services. Whats the purpose of this?
5.) The nagios account that is created with the ./fullinstall appear to have login capabilities? Is this required? We would prefer that it does not have login capabailites.

Thanks so much.

Re: NRPE Install on RHEL 4

Posted: Wed Sep 17, 2014 4:55 pm
by lmiltchev
1.) The daemon seems to be configured under xinetd which means it is running as root. Is there a better method which would register NRPE as a service running as nagios?
xinetd runs as root, however for nrpe it drops privileges to nagios.

Code: Select all

grep user /etc/xinetd.d/nrpe
Alternatively, you can run nrpe as a standalone daemon (not under xinetd).
2.) There is a nagcmd group created along with a nagios group. What are the functions of each?
The nagcmd group is installed by default when installing nagios/plugins.
http://nagios.sourceforge.net/docs/nagi ... edora.html
3.) The nrpe.cfg under /usr/local/nagios/etc/nrpe.cfg doesn't appear to be the active configuration file. It seems to be the nrpe.cfg found under xinetd. Is this correct?
Partially. The "/usr/local/nagios/etc/nrpe.cfg" is still used, along with another file (added by our installer) - "/usr/local/nagios/etc/nrpe/common.cfg". The "/etc/xinetd.d/nrpe" file is manly used for specifying the allowed IPs on the "only_from" line. If you use nrpe as a standalone daemon, you would add the IPs on the "allowed_hosts" line in the "/usr/local/nagios/etc/nrpe.cfg" file.
4.) ndo2db 5668/tcp seems to be configured under services. Whats the purpose of this?
This has nothing to do with nrpe. It uses port 5666.
5.) The nagios account that is created with the ./fullinstall appear to have login capabilities? Is this required? We would prefer that it does not have login capabailites.
nagios user has no password, so at least in theory, you can't log in as nagios, but I see your point. You are welcome to change "/bin/bash" to "/sbin/nologin" in "/etc/passwd".