NRPE: Unable to read output

by jagbir on October 16, 2008

One of my colleague performed speedy installation of NRPE module in a machine but found that the Nagios server is not able to query that machine.

In Nagios screen it shows:

NRPE: Unable to read output.

Checking from the machine itself, NRPE is giving correct version but throwing same error for any other checks:

$[root@domU:/usr/local/nagios/libexec] ./check_nrpe -H localhost
NRPE v2.8
$[root@domU:/usr/local/nagios/libexec] ./check_nrpe -H localhost -c check_load
NRPE: Unable to read output

After further digging, I’ve found he installed Nagios-plugins using yum which placed plugins files in some different location then desired by NRPE.

Then I installed nagios-plugins manually:

$ cd /usr/src
$ wget
$ tar xzf nagios-plugins-1.4.6.tar.gz
$ cd nagios-plugins-1.4.6
$ ./configure --without-mysql
$ make
$ make install

The problem is resolved immediately.

  • Steve

    Thanks, it solves my problem

  • Neghost

    Thank you for your post. This help me to solve the same problem :)

  • vicfromsky

    This work for me:

    The check_nrpe plugin returns “NRPE: Unable to read output”
    This error indicates that the command that was run by the NRPE daemon did not return any character output.
    This could be an indication of the following problems:
    – An incorrectly defined command line in the command definition. Verify that the command definition in your
    NRPE configuration file is correct.
    – The plugin that is specified in the command line is malfunctioning. Run the command line manually to make
    sure the plugin returns some kind of text output

    command[check_sda5]=/usr/local/nagios/libexec/”check_disk” -w 20% -c 10% -p /dev/sda5 <– "check_disk"

  • jagbir

    @vicfromsky, Thanks for the comment and valuable information about the check.

  • mike

    One other possible cause – can the plugin be executed by the nagios user (or whatever user you’re using for nrpe)? If only root can execute it and your tests are as root and work, it will still not produce output through check_nrpe if that user can’t execute the plugin.

    • jagbirs

      Hey Mike, thanks for comment and yes, this is very important to check the permissions. In fact, this should be done at the first instance if we are unable to execute the plugin under nagios user.

Previous post:

Next post: