Page 1 of 2

NRPE installation @ OEL server

Posted: Sun Jan 10, 2016 10:36 am
by inas.labib
Hi ,

Unable to finish installation of nrpe agent for Oracle Linux servers. When I go through the prerequisite script '1-prereqs ' , it doesn't contain [ "$distro" == "OracleServer" ] to install dependent packages.

I modified the '1-prereqs' as below , installation finishes properly.

root@client:/tmp/linux-nrpe-agent# cat 1-prereqs
if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ] || [ "$distro" == "Fedora" ] || [ "$distro" == "OracleServer" ] ; then
yum -y install autoconf gcc glibc libmcrypt-devel make openssl-devel sudo sysstat xinetd bc

Please confirm is this the workaround ..

I use the latest package :
# wget https://assets.nagios.com/downloads/nag ... ent.tar.gz

Error: /var/log/messages
Jan 10 18:14:27 client xinetd[18803]: Server /usr/local/nagios/bin/nrpe is not executable [file=/etc/xinetd.d/nrpe] [line=9]
Jan 10 18:14:27 client xinetd[18803]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/nrpe] [line=9]
Jan 10 18:14:27 client xinetd[18803]: Must specify a server in nrpe
Jan 10 18:14:27 client xinetd[18803]: Must specify a server in nrpe

Thanks,

Re: NRPE installation @ OEL server

Posted: Mon Jan 11, 2016 10:59 am
by hsmith
Do you have the installation log that you can post for us to review?

Re: NRPE installation @ OEL server

Posted: Tue Jan 12, 2016 11:41 am
by inas.labib
Hi ,

please find the attached install.log with this. Few days back I posted the same issue "Nagiosxi agent installation issue"

Re: NRPE installation @ OEL server

Posted: Tue Jan 12, 2016 12:04 pm
by jolson
After toggling the setting mentioned above, does the install work properly for you? If so it would be easy enough for us to modify the code and add Oracle Linux to the default script.

If the installation does not work (and the log files make it seem like this is the case) please attempt to run some verification on the nrpe binary file. There is another thread in the forums with a similar issue, and it seems to me that the NRPE binary file isn't generated properly when compiling on Oracle Linux.

Give the following a try:

Code: Select all

file /usr/local/nagios/bin/nrpe
ls -l /usr/local/nagios/bin/nrpe
find / -name nrpe -type f

Re: NRPE installation @ OEL server

Posted: Tue Jan 12, 2016 12:06 pm
by hsmith
All right, it looks like we got it working in your previous thread. The installation log looks good.

I'm assuming that error message is what you would like to troubleshoot.

What is the output of these commands?

Code: Select all

ls -lR /usr/local/nagios | grep nrpe
cat /etc/xinetd.d/nrpe
cat /usr/local/nagios/etc/nrpe.cfg | sed -e '/^\s*$/d' -e '/^#/d'

Re: NRPE installation @ OEL server

Posted: Thu Jan 14, 2016 6:53 am
by inas.labib
After adding the [ "$distro" == "OracleServer" ] in 1-prereqs file , the installation finishes properly and able to get below files.

root@client:~# ls -lR /usr/local/nagios | grep nrpe
-rwxrwxr-x 1 nagios nagios 144876 Jan 13 12:50 nrpe
-rw-r--r-- 1 nagios nagios 7217 Jan 13 12:50 nrpe.cfg
/usr/local/nagios/etc/nrpe:
-rwxrwxr-x 1 nagios nagios 76809 Jan 13 12:50 check_nrpe
root@client:~#


root@client:~# cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.xx.xx.xx
}
root@client:~#



root@client:~# cat /usr/local/nagios/etc/nrpe.cfg | sed -e '/^\s*$/d' -e '/^#/d'
log_facility=daemon
pid_file=/var/run/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1
dont_blame_nrpe=1
debug=0
command_timeout=60
connection_timeout=300
include_dir=/usr/local/nagios/etc/nrpe
root@client:~#


If I use the default 1-prereqs , then I need to manually install below as suggested in my previous thread.

yum -y install autoconf gcc glibc libmcrypt-devel make openssl-devel sudo sysstat xinetd bc
cd /tmp/linux-nrpe-agent# cd subcomponents/nrpe/
./install

Re: NRPE installation @ OEL server

Posted: Thu Jan 14, 2016 3:59 pm
by ssax
What is the output of these commands?

Code: Select all

grep nag /etc/group
ls -ld /usr/local/nagios/etc
ls -ld /usr/local/nagios/bin
ls -l /usr/local/nagios/bin

Re: NRPE installation @ OEL server

Posted: Mon Jan 18, 2016 2:56 am
by inas.labib
Please find the results below

# grep nag /etc/group
nagios:x:10004:nagios
nagcmd:x:10005:nagios


# ls -ld /usr/local/nagios/etc
drwxrwxr-x 3 nagios nagios 4096 Jan 13 13:18 /usr/local/nagios/etc


# ls -ld /usr/local/nagios/bin
drwxrwxr-x 2 nagios nagios 4096 Jan 13 13:18 /usr/local/nagios/bin


# ls -l /usr/local/nagios/bin
total 256
-rwxrwxr-x 1 nagios nagios 144876 Jan 13 13:18 nrpe
-rwxr-xr-x 1 nagios nagios 113634 Jan 10 18:14 nsca

Re: NRPE installation @ OEL server

Posted: Mon Jan 18, 2016 12:25 pm
by ssax
Try installing the SSL packages first, then run the installation again so that it will include SSL support:

Code: Select all

yum install openssl openssl-devel

Re: NRPE installation @ OEL server

Posted: Tue May 30, 2017 1:46 pm
by ctretelea
inas.labib wrote:After adding the [ "$distro" == "OracleServer" ] in 1-prereqs file , the installation finishes properly and able to get below files.

root@client:~# ls -lR /usr/local/nagios | grep nrpe
-rwxrwxr-x 1 nagios nagios 144876 Jan 13 12:50 nrpe
-rw-r--r-- 1 nagios nagios 7217 Jan 13 12:50 nrpe.cfg
/usr/local/nagios/etc/nrpe:
-rwxrwxr-x 1 nagios nagios 76809 Jan 13 12:50 check_nrpe
root@client:~#


root@client:~# cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.xx.xx.xx
}
root@client:~#



root@client:~# cat /usr/local/nagios/etc/nrpe.cfg | sed -e '/^\s*$/d' -e '/^#/d'
log_facility=daemon
pid_file=/var/run/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1
dont_blame_nrpe=1
debug=0
command_timeout=60
connection_timeout=300
include_dir=/usr/local/nagios/etc/nrpe
root@client:~#


If I use the default 1-prereqs , then I need to manually install below as suggested in my previous thread.

yum -y install autoconf gcc glibc libmcrypt-devel make openssl-devel sudo sysstat xinetd bc
cd /tmp/linux-nrpe-agent# cd subcomponents/nrpe/
./install
It's working for me also. I changed 1-prereqs file and I installed it successful.