Page 3 of 4

Re: Configuring NRPE client CentOS7

Posted: Thu May 02, 2019 4:46 pm
by tgriep
Edit the /usr/local/nagios/etc/nrpe/common.cfg file on the Centos7 server

Add a command like this

Code: Select all

command[elastic]=/usr/local/nagios/libexec/check_services -p elasticsearch
Save the change and restart xinetd

Code: Select all

service xinetd restart
Then run this command from the Nagios server

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c elastic
If it fails, check the bottom of the /var/log/messages file on the logserver for any errors and post them here.

Re: Configuring NRPE client CentOS7

Posted: Thu May 02, 2019 4:53 pm
by rferebee
Ok. That worked.

Re: Configuring NRPE client CentOS7

Posted: Thu May 02, 2019 4:55 pm
by tgriep
Great, getting progress.
What about this?

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_services -a elastic

Re: Configuring NRPE client CentOS7

Posted: Thu May 02, 2019 4:59 pm
by rferebee
Yes, that worked too.

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 9:56 am
by lmiltchev
Is your issue resolved now or you have further questions?

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 10:08 am
by rferebee
No, it's not resolved.

I shouldn't need to explicitly define every service I want to run a check against. We need to figure out why these checks are working properly on my original Log Servers, but not the new node I introduced.

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 11:39 am
by scottwilkerson
rferebee wrote:No, it's not resolved.

I shouldn't need to explicitly define every service I want to run a check against. We need to figure out why these checks are working properly on my original Log Servers, but not the new node I introduced.
Please attach the /usr/local/nagios/etc/nrpe.cfg and /usr/local/nagios/etc/nrpe/common.cfg from your Log Server

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 11:45 am
by rferebee
Please see attached. I uploaded both the working and not working versions of the files your requested.

Thank you.

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 1:07 pm
by scottwilkerson
the check_services commands are identical on these.

What is the error you are getting?

How are you running the command (can you give an example running the command from the CLI)

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 1:27 pm
by rferebee
There error is: CHECK_NRPE: No output returned from daemon.

Here's the output from the CLI.

Bad server:

[rferebee@nagiosxi ~]$ sudo su -
root@nagiosxi> /usr/local/nagios/libexec/check_nrpe -2 -H 10.128.207.115 -t 30 -c check_services 'elasticsearch'
CHECK_NRPE: No output returned from daemon.


Good server:

root@nagiosxi> /usr/local/nagios/libexec/check_nrpe -2 -H 10.128.207.111 -c check_services -t 30 -a 'elasticsearch'
elasticsearch: 1