NRPE Install on RHEL 4

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
AMacintosh
Posts: 59
Joined: Mon Nov 07, 2011 12:26 pm

NRPE Install on RHEL 4

Post 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,
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Install on RHEL 4

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
AMacintosh
Posts: 59
Joined: Mon Nov 07, 2011 12:26 pm

Re: NRPE Install on RHEL 4

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE Install on RHEL 4

Post 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.
AMacintosh
Posts: 59
Joined: Mon Nov 07, 2011 12:26 pm

Re: NRPE Install on RHEL 4

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Install on RHEL 4

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
AMacintosh
Posts: 59
Joined: Mon Nov 07, 2011 12:26 pm

Re: NRPE Install on RHEL 4

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Install on RHEL 4

Post 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".
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked