NRPE: Unable to read output

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
Pratapa
Posts: 150
Joined: Tue Oct 01, 2019 1:33 am

NRPE: Unable to read output

Post by Pratapa »

Hi,

We are using Nagios core 4.4.4

On one of the remote servers which is a Linux server we are getting error "NRPE: unable to read output" for all the services.

When we execute the following command on remote machine we are getting "NRPE: unable to read output"

$ ./check_nrpe -H localhost -c check_mailq
NRPE: unable to read output

Following is the entry in nrpe.cfg

command[check_mailq]=/usr/bin/sudo /usr/local/nagios/libexec/check_linux_mailq.bash -w $ARG1$ -c $ARG2$

$ ls -l /usr/local/nagios/libexec/check_linux_mailq.bash
-rwxrwxrwx. 1 nagios nagios 1087 Apr 7 14:57 /usr/local/nagios/libexec/check_linux_mailq.bash

We don't see any permission issue.

nrpe is running.

telnet <hostname> 5666 ---- connecting.

What could be the problem.
kg2857
Posts: 351
Joined: Wed Apr 12, 2023 5:48 pm

Re: NRPE: Unable to read output

Post by kg2857 »

You need to provide the -w and -c values as shown in the command.
Pratapa
Posts: 150
Joined: Tue Oct 01, 2019 1:33 am

Re: NRPE: Unable to read output

Post by Pratapa »

$pwd
/usr/local/nagios/libexec
$./check_nrpe -H localhost -c check_mailq -a 10 20
NRPE: Unable to read output

Still the same.
kg2857
Posts: 351
Joined: Wed Apr 12, 2023 5:48 pm

Re: NRPE: Unable to read output

Post by kg2857 »

As the nagios user run:
/usr/bin/sudo /usr/local/nagios/libexec/check_linux_mailq.bash -w 10 -c 20
You might try removing the -a too.
You could try some troubleshooting steps on your own as well.
Post Reply