Page 2 of 3

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

Posted: Thu Oct 04, 2018 1:28 pm
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 ~)$

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

Posted: Thu Oct 04, 2018 2:38 pm
by lmiltchev
We pushed NRPE 3.2.1, but it may take up to a day before the repo is updated.

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

Posted: Thu Oct 04, 2018 2:41 pm
by jenglish
Thanks. I will update this topic whenever we can get 3.2.1.

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

Posted: Thu Oct 04, 2018 3:24 pm
by lmiltchev
Noted.

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

Posted: Tue Oct 23, 2018 1:35 pm
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.

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

Posted: Tue Oct 23, 2018 3:22 pm
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?

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

Posted: Wed Oct 24, 2018 9:51 am
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

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

Posted: Wed Oct 24, 2018 4:27 pm
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

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

Posted: Mon Oct 29, 2018 9:52 am
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.

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

Posted: Mon Oct 29, 2018 12:41 pm
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