Page 1 of 1

NRPE: Unable to read output

Posted: Fri Sep 19, 2014 6:57 am
by ashok
Hi All,
I have one linux redhat server 4.7

I have installed nrpe in that and i have been monitoring it from 1 year..

but, from 1 month, for only two services remaining all are fine , i'm getting the out put as

NRPE: Unable to read output


for crond and syslog .... I have deleted the plugin and replaced from a well working server. yet no use...

I copied from server2 to server1 ...the outputs are like this..both are redhat only..

[root@nagxi libexec]# ./check_nrpe -H server1 -p 5666 -c check_init_service -a syslog
NRPE: Unable to read output
You have mail in /var/spool/mail/root
[root@nagxi libexec]# ./check_nrpe -H server1 -p 5666 -c check_init_service -a crond
NRPE: Unable to read output
[root@nagxi libexec]# ./check_nrpe -H sserver2 -p 5666 -c check_init_service -a syslog
syslogd (pid 3705) is running...
klogd (pid 3709) is running...
[root@nagxi libexec]# ./check_nrpe -H server1 -p 5666 -c check_init_service -a crond
NRPE: Unable to read output
[root@nagxi libexec]# ./check_nrpe -H server2 -p 5666 -c check_init_service -a crond
crond (pid 4051) is running...
[root@nagxi libexec]# ./check_nrpe -H server2
NRPE v2.12
You have mail in /var/spool/mail/root
[root@nagxi libexec]# ./check_nrpe -H server1
NRPE v2.12



Please help me on figuring this out...

thanx

Re: NRPE: Unable to read output

Posted: Fri Sep 19, 2014 9:47 am
by eloyd
Check your sudoers file on server1 to make sure that the nagios user is allowed to execute the "check_init_service" command to check the state of a running service.

EDIT - changed "service" to "check_init_service"

Re: NRPE: Unable to read output

Posted: Fri Sep 19, 2014 1:53 pm
by sreinhardt
This is an excellent point! If sudoers is set correctly for the nagios user to call service, what openssl version are on all three systems?

Code: Select all

rpm -qa | grep openssl 

Re: NRPE: Unable to read output

Posted: Fri Sep 19, 2014 1:55 pm
by lmiltchev
@ashok

eloyd is correct. You will need to have something like this in sudoers:

Code: Select all

# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service

Re: NRPE: Unable to read output

Posted: Mon Sep 22, 2014 12:05 am
by ashok
Thanks a lot...issue resloved