Strange nrpe 4.0.3 problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Strange nrpe 4.0.3 problem

Post by rajasegar »

Hi there,

I am testing the new 4.0.3 agent and getting this weird problem

This is using 4.0.3 nrpe agent in RHEL8. It is mixing up the parameter with command.
Check using the old check_nrpe gives hints about the issue
[nagios@myucbdnagiapp01 libexec]$ ./check_nrpe -H localhost -c "rs_GetOSVersion"
Red Hat Enterprise Linux release 8.2 (Ootpa) x86_64 [myucbdnagiapp01] *NRPE v3.2.1*

[nagios@myucbdnagiapp01 libexec]$ ./check_nrpe -H localhost -c "rs_GetOSVersion" -a "linux"
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

[nagios@myucbdnagiapp01 libexec]$ ./check_nrpe_v321r_rhel8 -H localhost -c "rs_GetOSVersion" -a "linux"
NRPE: Command 'rs_GetOSVersion!linux' not defined

[nagios@myucbdnagiapp01 libexec]$ ./check_nrpe_v321r_rhel7 -H localhost -c "rs_GetOSVersion" -a "linux"
NRPE: Command 'rs_GetOSVersion!linux' not defined

This is using 3.2.1r nrpe agent in RHEL8, it is working fine.
[nagios@myucbdnagiapp01 libexec]$ ./check_nrpe_v321r_rhel7 -H localhost -c "rs_GetOSVersion"
Red Hat Enterprise Linux release 8.2 (Ootpa) x86_64 [myucbdnagiapp01] *NRPE v3.2.1*

[nagios@myucbdnagiapp01 libexec]$ ./check_nrpe_v321r_rhel7 -H localhost -c "rs_GetOSVersion" -a linux
Red Hat Enterprise Linux release 8.2 (Ootpa) x86_64 [myucbdnagiapp01] *NRPE v3.2.1*
Here is the nrpe.cfg file
#############################################################################
#
# NRPE Config File V3.0.1
#############################################################################


log_facility=daemon
log_file=/usr/local/nagios/nrpe.log
debug=0
pid_file=/usr/local/nagios/var/nrpe.pid
server_port=5666
#listen_queue_size=5
nrpe_user=nagios
nrpe_group=nagios

allowed_hosts=127.0.0.1,::1

dont_blame_nrpe=1
allow_bash_command_substitution=0
command_timeout=60
connection_timeout=300

command[rs_GetOSVersion]=/usr/local/nagios/libexec/rs_GetOSVersion $ARG1$
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Strange nrpe 4.0.3 problem

Post by ssax »

This usually occurs when you don't enable arguments during the compile of NRPE.

Did you install through this utility (it should do it for you)?

https://assets.nagios.com/downloads/nag ... _Agent.pdf

Or if you compiled from source, you'll need to do this:

Code: Select all

cd /tmp/nrpe-nrpe-4.0.3/
./configure --enable-command-args
make all
Taken from here:

https://support.nagios.com/kb/article.php?id=515#RHEL
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Strange nrpe 4.0.3 problem

Post by rajasegar »

ssax wrote:This usually occurs when you don't enable arguments during the compile of NRPE.

Did you install through this utility (it should do it for you)?

https://assets.nagios.com/downloads/nag ... _Agent.pdf

Or if you compiled from source, you'll need to do this:

Code: Select all

cd /tmp/nrpe-nrpe-4.0.3/
./configure --enable-command-args
make all
Taken from here:

https://support.nagios.com/kb/article.php?id=515#RHEL
Thanks. No wonder. You can close the thread.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Strange nrpe 4.0.3 problem

Post by benjaminsmith »

Hi @rajasegar,

Thanks for the update and glad it's working for you now.

Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked