Page 1 of 2
NRPE: Unable to read output
Posted: Fri Sep 21, 2018 6:06 am
by RIDS_I2MP
Hello Team,
We are monitoring one AIX server on which we are monitoring a number of services. The problem is few of the services are monitored properly, but other are in "Unknown" status with error message as "NRPE: Unable to read output".
And those services which are having problem are running perfectly fine on other servers. So I don't think there is any issue with the configuration of services. I am attaching the screen shot here from Nagios XI for that particular server.
Please let me know if you want me to provide nrpe.cfg file or any other information.
Thanks in advance!!!
Re: NRPE: Unable to read output
Posted: Fri Sep 21, 2018 10:06 am
by lmiltchev
I would help if you showed us how the commands for failing services (in Unknown state) are configured on the remote server in the nrpe.cfg file.
Also, can you run these commands locally on the remote box, and show the output? We need to make sure these commands work on the client before trying to troubleshoot issues with check_nrpe.
Re: NRPE: Unable to read output
Posted: Mon Sep 24, 2018 4:52 am
by RIDS_I2MP
Hello,
Thanks for your reply!!
I ran the commands for failing services in Nagios server and got the same error.
PFA the output of commands and nrpe.cfg file as well.
Nagios server :
IP: 10.147.108.46
Host name : eu2napu003
Monitoring server:
IP: 10.147.219.187
Host name: EU2NBKU001
Let me know if you need any other information.
Re: NRPE: Unable to read output
Posted: Mon Sep 24, 2018 9:30 am
by lmiltchev
Can you run these commands
on the remote server as nagios user and show the output?
Code: Select all
/usr/local/nagios/libexec/cpu_ent -w 500 -c 600
/usr/local/nagios/libexec/check_services -p cron
/usr/local/nagios/libexec/check_services -p errdemon
/usr/local/nagios/libexec/check_services -p syslogd
/usr/local/nagios/libexec/check_services -p xntpd
Let's make sure they work when run locally.
Re: NRPE: Unable to read output
Posted: Tue Sep 25, 2018 4:16 am
by RIDS_I2MP
Hello,
I ran the commands provided by you on Nagios XI server and on remote server as well.
I am getting below error for them:
ksh: /usr/local/nagios/libexec/check_services: not found
I am attaching the command output and the details of files present in /usr/local/nagios/libexec path for both servers.
Its strange that if the services are not found on Nagios server itself, how those services are running fine on other remote servers which are being monitored in Nagios.
Re: NRPE: Unable to read output
Posted: Tue Sep 25, 2018 10:30 am
by lmiltchev
The check_services file exists on the remote box, but you are getting the error below:
ksh: /usr/local/nagios/libexec/check_services: not found
It seems like that you are using korn shell on this machine. The check should work anyway, but there must be something that is messed up with the environment... Run the following commands on the remote machine and show the output:
Code: Select all
echo $SHELL
which sh
which bash
which ksh
head -1 /usr/local/nagios/libexec/check_services
sh /usr/local/nagios/libexec/check_services -p cron
Re: NRPE: Unable to read output
Posted: Tue Sep 25, 2018 11:30 pm
by RIDS_I2MP
Hello,
PFA the output for the commands provided by you.
Re: NRPE: Unable to read output
Posted: Wed Sep 26, 2018 8:45 am
by lmiltchev
NON-PROD> nagios@eu2nbku001: /home/nagios > which bash
no bash in /usr/bin /etc /usr/sbin /usr/ucb /home/nagios/bin /usr/bin/X11 /sbin .
You don't have bash in your environment, which is needed for this plugin (and some other plugins too) in order to run. I would recommend that you install bash and try your check again.
Re: NRPE: Unable to read output
Posted: Fri Sep 28, 2018 4:26 am
by RIDS_I2MP
Hello,
Thanks for the reply!!
I will check with the owner of the server and get back to you. Please keep the topic open

Re: NRPE: Unable to read output
Posted: Fri Sep 28, 2018 9:03 am
by lmiltchev
Noted.