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.
Locked
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

NRPE: Unable to read output

Post 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
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE: Unable to read output

Post 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"
Last edited by eloyd on Fri Sep 19, 2014 1:59 pm, edited 1 time in total.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NRPE: Unable to read output

Post 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 
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

Re: NRPE: Unable to read output

Post by ashok »

Thanks a lot...issue resloved
Locked