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
NRPE: Unable to read output
Re: NRPE: Unable to read output
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"
EDIT - changed "service" to "check_init_service"
Last edited by eloyd on Fri Sep 19, 2014 1:59 pm, edited 1 time in total.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: NRPE: Unable to read output
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.
Re: NRPE: Unable to read output
@ashok
eloyd is correct. You will need to have something like this in sudoers:
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!
Re: NRPE: Unable to read output
Thanks a lot...issue resloved