Configuring NRPE client CentOS7

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Configuring NRPE client CentOS7

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Configuring NRPE client CentOS7

Post by rferebee »

Ok. That worked.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Configuring NRPE client CentOS7

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Configuring NRPE client CentOS7

Post by rferebee »

Yes, that worked too.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuring NRPE client CentOS7

Post by lmiltchev »

Is your issue resolved now or you have further questions?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Configuring NRPE client CentOS7

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configuring NRPE client CentOS7

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Configuring NRPE client CentOS7

Post by rferebee »

Please see attached. I uploaded both the working and not working versions of the files your requested.

Thank you.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configuring NRPE client CentOS7

Post 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)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Configuring NRPE client CentOS7

Post 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
Locked