Return Code: 3, Output: NRPE: Unable to read output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
jenglish
Posts: 59
Joined: Sat Jun 09, 2018 3:51 pm
Location: Boyers, PA

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by jenglish »

3.2.0 is the highest version in the EPEL repository.

Code: Select all

(TEST-BOYERS-3|jenglish@coralsea ~)$ sudo yum update nrpe
OPM-NM_nm-epel_nm_epel_Server7                                                                                                                                                       | 2.1 kB  00:00:00
OPM-NM_rhel-custom_7-custom                                                                                                                                                          | 2.1 kB  00:00:00
rhel-7-server-extras-rpms                                                                                                                                                            | 1.9 kB  00:00:00
rhel-7-server-optional-rpms                                                                                                                                                          | 2.0 kB  00:00:00
rhel-7-server-rpms                                                                                                                                                                   | 2.0 kB  00:00:00
rhel-7-server-satellite-tools-6.3-puppet4-rpms                                                                                                                                       | 2.1 kB  00:00:00
rhel-7-server-satellite-tools-6.3-rpms                                                                                                                                               | 2.1 kB  00:00:00
rhel-server-rhscl-7-rpms                                                                                                                                                             | 2.0 kB  00:00:00
No packages marked for update
(TEST-BOYERS-3|jenglish@coralsea ~)$ sudo yum info nrpe
Installed Packages
Name        : nrpe
Arch        : x86_64
Version     : 3.2.0
Release     : 6.el7
Size        : 356 k
Repo        : installed
From repo   : OPM-NM_nm-epel_nm_epel_Server7
Summary     : Host/service/network monitoring agent for Nagios
URL         : http://www.nagios.org
License     : GPLv2
Description : Nrpe is a system daemon that will execute various Nagios plugins
            : locally on behalf of a remote (monitoring) host that uses the
            : check_nrpe plugin.  Various plugins that can be executed by the
            : daemon are available at:
            : http://sourceforge.net/projects/nagiosplug
            :
            : This package provides the core agent.

(TEST-BOYERS-3|jenglish@coralsea ~)$
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by lmiltchev »

We pushed NRPE 3.2.1, but it may take up to a day before the repo is updated.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
jenglish
Posts: 59
Joined: Sat Jun 09, 2018 3:51 pm
Location: Boyers, PA

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by jenglish »

Thanks. I will update this topic whenever we can get 3.2.1.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by lmiltchev »

Noted.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
jenglish
Posts: 59
Joined: Sat Jun 09, 2018 3:51 pm
Location: Boyers, PA

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by jenglish »

Hi,

I've updated the host with 3.2.1-8.el7 and am still experiencing the same behavior.

Code: Select all

(TEST-BOYERS-3|jenglish@coralsea ~)$ sudo yum info nrpe | grep -i 'ver\|rel'
Version     : 3.2.1
Release     : 8.el7
Oct 23 14:34:20 coralsea nrpe[10154]: Host 10.0.130.70 is asking for command 'check_multipath' to be run...
Oct 23 14:34:20 coralsea nrpe[10154]: Running command: /usr/lib/nagios/plugins/check_multipath.sh
Oct 23 14:34:20 coralsea nrpe[10155]: WARNING: my_system() seteuid(0): Operation not permitted
Oct 23 14:34:20 coralsea nrpe[10154]: Command completed with return code 0 and output:
Oct 23 14:34:20 coralsea nrpe[10154]: Return Code: 3, Output: NRPE: Unable to read output
Oct 23 14:34:20 coralsea nrpe[10154]: Connection from 10.0.130.70 closed.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by lmiltchev »

Change the following command in the nrpe.cfg file from this:

Code: Select all

command[check_multipath]=/usr/lib/nagios/plugins/check_multipath.sh
to this:

Code: Select all

command[check_multipath]=sudo /usr/lib/nagios/plugins/check_multipath.sh
and restart nrpe.

Did this resolve your issue?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
jenglish
Posts: 59
Joined: Sat Jun 09, 2018 3:51 pm
Location: Boyers, PA

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by jenglish »

Sadly, no change.

The two things that stick in my mind about this are that:
Other non-RHEL7 servers behave as expected
This check is performed by another host by proxy

I did a small drawing to try and illustrate what I'm speaking of. Hopefully this makes sense, but when the command is ran on the Nagios server it is ran by proxy from the jumpbox.
Capture.PNG
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by npolovenko »

@jenglish, Let's run the following command from the NRPE server. If it works like this then the proxy is to blame.
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_multipath
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
jenglish
Posts: 59
Joined: Sat Jun 09, 2018 3:51 pm
Location: Boyers, PA

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by jenglish »

Sorry for the delay. Both of these hosts are in the same model as in the drawing.

Code: Select all

RHEL7 nrpe:

(TEST-BOYERS-3|jenglish@coralsea ~)$ /usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_multipath
NRPE: Unable to read output

RHEL6 nrpe:

(TEST-BOYERS-3|jenglish@vincon ~)$ /usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_multipath
OK - Not hooked up to the 3PAR SAN.  Exiting.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Return Code: 3, Output: NRPE: Unable to read output

Post by npolovenko »

@jenglish, Please add these entries to the /etc/sudoers file on the TEST-BOYERS-3 RHEL7 server.
Defaults:nrpe !requiretty
nrpe ALL=(ALL) NOPASSWD: /usr/lib64/nagios/plugins/
Also, run the check_multipath plugin on that server locally as root and show me the output:
/usr/lib64/nagios/plugins/check_multipath.sh
If you have SELinux enabled please disable it(at least temporarily):
https://support.nagios.com/kb/article.php?id=25
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked