Page 1 of 2

check_nrpe Unable to read output

Posted: Thu Jul 03, 2014 3:17 pm
by akepley
I just upgraded to 2014R1.2

I created a new monitored host and services and some of the services (specifically yum, memory, and CPU) are coming back "Unknown: NRPE: Unable to read output".

I have tried the following:

checked the client nrpe.cfg file:

Code: Select all

# 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       = 172.16.17.95
}
Checked the scripts:

Code: Select all

-rwx------. 1 root   root     3060 Jun 23 14:24 custom_check_mem
Notice this check requires sudo, so I added to the sudoers file for nagios user:

Code: Select all

Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/custom_check_mem
Nothing has changed the output of the original error:

Code: Select all

Memory Usage;UNKNOWN;SOFT;3;NRPE: Unable to read output

Re: check_nrpe Unable to read output

Posted: Mon Jul 07, 2014 12:39 pm
by tmcdonald
Can you post the custom_check_mem file? I am guessing that calls check_nrpe, but if that is the case is there any reason you have a wrapper?

Re: check_nrpe Unable to read output

Posted: Mon Jul 07, 2014 3:11 pm
by akepley
I'm sorry, I'm misunderstanding. Do you want me to post the file contents for the custom_check_mem file from the client server under /usr/local/nagios/libexec?

Re: check_nrpe Unable to read output

Posted: Mon Jul 07, 2014 7:55 pm
by Box293
Yes, please attach the custom_check_mem file from the client server (you might need to give it a .txt extension).

Re: check_nrpe Unable to read output

Posted: Tue Jul 08, 2014 7:43 am
by akepley
File Attached

Re: check_nrpe Unable to read output

Posted: Tue Jul 08, 2014 3:56 pm
by tmcdonald
Are any of your NRPE checks working or is it just this one failing?

Re: check_nrpe Unable to read output

Posted: Tue Jul 08, 2014 4:00 pm
by akepley
Just a few of the services. See the attached screenshot.

Re: check_nrpe Unable to read output

Posted: Tue Jul 08, 2014 5:33 pm
by abrist
I presume the monitored server is cent/rhel? Can you run the check from the cli?

Code: Select all

/usr/local/nagios/libexec/custom_check_mem

Re: check_nrpe Unable to read output

Posted: Wed Jul 09, 2014 8:18 am
by akepley
The monitored server is a VM on VMWare running RHEL.

As nagios user running the custom_check_mem I get permission denied on the monitored server. This is after I have added the following to sudoers:

Code: Select all

nagios ALL=NOPASSWD: /usr/local/nagios/libexec/custom_check_mem

Re: check_nrpe Unable to read output

Posted: Wed Jul 09, 2014 12:27 pm
by slansing
Hmm permission denied eh? How were nrpe and the nagios plugins package installed on this system? Did you just use the xi-linux-agent guide? What is the output of the following when ran on that system?:

Code: Select all

ll /usr/local/nagios/libexec/

ll /usr/local/nagios/