NRPE Unable to read output - ON CENTOS7 Server
Posted: Wed May 27, 2020 7:52 am
Hi
I have setup 2 new Postfix Servers on CentOS7
I have configured nagios the same way on these systems as our original RHEL6 Servers
but when I try and monitor any of the custom monitors all I get back is UNKOWN NRPE: Unable to read output
On our Postfix Server we have the following configured
/etc/nrpe.d/postfix.cfg
# We cannot have dont_blame_nrpe=1
dont_blame_nrpe=1
allowed_hosts=127.0.0.1,<IPADDRESS of Nagios Server>
command[check_cup]=/usr/lib64/nagios/plugins/check_cup
command[check_postfix_mailqueue]=sudo /usr/lib64/nagios/plugins/check_postfix_mailqueue
command[check_postfix]=sudo /usr/lib64/nagios/plugins/check_procs -c 1: -a '/usr/libexec/postfix/master' -u root
command[check_clamsmtp]=sudo /usr/lib64/nagios/plugins/check_procs -c 1: -a 'clamd.clamsmtp -c /etc/clamd.d/clamsmtp.conf' -u clamsmtp
command[check_clamsmtpd]=sudo /usr/lib64/nagios/plugins/check_procs -c 1: -a 'clamsmtpd -f /etc/clamsmtpd.conf' -u clamsmtp
command[check_splunk]=sudo /usr/lib64/nagios/plugins/check_procs -c 1:3 -C splunkd
command[check_mail_ratio]=sudo /usr/lib64/nagios/plugins/check_mail_ratio
The following files do exist in the /usr/lib64/nagios/plugins/ Directory
check_mailq, check_mail_ratio, check_postfix_mailqueue, check_procs
owner is root:root
permissions 755
The same files and permissions are on both of the postfix server types
From the Nagios Server itself I can run the check_nrpe command
[root@dwylbopngios01 libexec]# ./check_nrpe -H <IPADDRESS of RHEL6 Server> -c check_mail_ratio
OK - Successful mail delivery ratio 21%
[root@dwylbopngios01 libexec]# ./check_nrpe -H <IPADDRESS of the CentOS7 Server> -c check_mail_ratio
NRPE: Unable to read output
On the CentOS7 Server the default monitors work fine
check_disk
check_mem
check_cpu
On the CentOS7 Postfix Server
[root@CENTOS7POSTFIX ~]# su - nagios -s /bin/bash
Last login: Wed May 27 08:30:43 EDT 2020 on pts/0
-bash-4.2$ whoami
nagios
-bash-4.2$ sudo /usr/lib64/nagios/plugins/check_mail_ratio
OK - Successful mail delivery ratio 100%-bash-4.2$
-bash-4.2$
-bash-4.2$ exit
logout
[root@CentOS7POSTFIX ~]# su - nrpe -s /bin/bash
Last login: Wed May 27 08:47:15 EDT 2020 on pts/0
-bash-4.2$ whoami
nrpe
-bash-4.2$ sudo /usr/lib64/nagios/plugins/check_mail_ratio
OK - Successful mail delivery ratio 100%-bash-4.2$
-bash-4.2$
-bash-4.2$
So the nagios and the nrpe users can run the command but it seems there is a issue just accessing the system from the Nagios Server
besides 5666 is there another port that is required to be open on the CentOS7 Servers?
or is there an extra plugin required ?
I have setup 2 new Postfix Servers on CentOS7
I have configured nagios the same way on these systems as our original RHEL6 Servers
but when I try and monitor any of the custom monitors all I get back is UNKOWN NRPE: Unable to read output
On our Postfix Server we have the following configured
/etc/nrpe.d/postfix.cfg
# We cannot have dont_blame_nrpe=1
dont_blame_nrpe=1
allowed_hosts=127.0.0.1,<IPADDRESS of Nagios Server>
command[check_cup]=/usr/lib64/nagios/plugins/check_cup
command[check_postfix_mailqueue]=sudo /usr/lib64/nagios/plugins/check_postfix_mailqueue
command[check_postfix]=sudo /usr/lib64/nagios/plugins/check_procs -c 1: -a '/usr/libexec/postfix/master' -u root
command[check_clamsmtp]=sudo /usr/lib64/nagios/plugins/check_procs -c 1: -a 'clamd.clamsmtp -c /etc/clamd.d/clamsmtp.conf' -u clamsmtp
command[check_clamsmtpd]=sudo /usr/lib64/nagios/plugins/check_procs -c 1: -a 'clamsmtpd -f /etc/clamsmtpd.conf' -u clamsmtp
command[check_splunk]=sudo /usr/lib64/nagios/plugins/check_procs -c 1:3 -C splunkd
command[check_mail_ratio]=sudo /usr/lib64/nagios/plugins/check_mail_ratio
The following files do exist in the /usr/lib64/nagios/plugins/ Directory
check_mailq, check_mail_ratio, check_postfix_mailqueue, check_procs
owner is root:root
permissions 755
The same files and permissions are on both of the postfix server types
From the Nagios Server itself I can run the check_nrpe command
[root@dwylbopngios01 libexec]# ./check_nrpe -H <IPADDRESS of RHEL6 Server> -c check_mail_ratio
OK - Successful mail delivery ratio 21%
[root@dwylbopngios01 libexec]# ./check_nrpe -H <IPADDRESS of the CentOS7 Server> -c check_mail_ratio
NRPE: Unable to read output
On the CentOS7 Server the default monitors work fine
check_disk
check_mem
check_cpu
On the CentOS7 Postfix Server
[root@CENTOS7POSTFIX ~]# su - nagios -s /bin/bash
Last login: Wed May 27 08:30:43 EDT 2020 on pts/0
-bash-4.2$ whoami
nagios
-bash-4.2$ sudo /usr/lib64/nagios/plugins/check_mail_ratio
OK - Successful mail delivery ratio 100%-bash-4.2$
-bash-4.2$
-bash-4.2$ exit
logout
[root@CentOS7POSTFIX ~]# su - nrpe -s /bin/bash
Last login: Wed May 27 08:47:15 EDT 2020 on pts/0
-bash-4.2$ whoami
nrpe
-bash-4.2$ sudo /usr/lib64/nagios/plugins/check_mail_ratio
OK - Successful mail delivery ratio 100%-bash-4.2$
-bash-4.2$
-bash-4.2$
So the nagios and the nrpe users can run the command but it seems there is a issue just accessing the system from the Nagios Server
besides 5666 is there another port that is required to be open on the CentOS7 Servers?
or is there an extra plugin required ?