NRPE: Unable to read output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

NRPE: Unable to read output

Post 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!!!
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: NRPE: Unable to read output

Post 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.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: NRPE: Unable to read output

Post 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.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: NRPE: Unable to read output

Post by RIDS_I2MP »

Hello,

PFA the output for the commands provided by you.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: NRPE: Unable to read output

Post 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 :)
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output

Post by lmiltchev »

Noted.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked