NRPE installation @ OEL server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

NRPE installation @ OEL server

Post 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,
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE installation @ OEL server

Post by hsmith »

Do you have the installation log that you can post for us to review?
Former Nagios Employee.
me.
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: NRPE installation @ OEL server

Post by inas.labib »

Hi ,

please find the attached install.log with this. Few days back I posted the same issue "Nagiosxi agent installation issue"
You do not have the required permissions to view the files attached to this post.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NRPE installation @ OEL server

Post 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
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE installation @ OEL server

Post 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'
Former Nagios Employee.
me.
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: NRPE installation @ OEL server

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NRPE installation @ OEL server

Post 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
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: NRPE installation @ OEL server

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NRPE installation @ OEL server

Post 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
ctretelea
Posts: 59
Joined: Fri Feb 17, 2017 5:43 pm

Re: NRPE installation @ OEL server

Post 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.
Locked