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.
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 »

How about this

Code: Select all

/usr/local/nagios/libexec/check_nrpe -2 -H 10.128.207.115 -c check_services -t 30 -a 'elasticsearch'
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 »

Yes, that works.

[rferebee@nagiosxi ~]$ sudo su -
root@nagiosxi> /usr/local/nagios/libexec/check_nrpe -2 -H 10.128.207.115 -c check_services -t 30 -a 'elasticsearch'
elasticsearch: 1


So, a little background. I was told by someone on your end that the command we were using for check_nrpe was not the default and they suggested I change it to the default so when I run the Linux Server wizard it will use the correct command.

I'm guessing that -a has something to do with our issue?
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 »

Yes, you need to pass -a when running check_nrpe which tells the command what follows is the argument

This is usually passed in the $ARG1$ of the service

Code: Select all

-a 'elasticsearch'
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 »

Ok, so here's the command we're using for check_nrpe:

$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$

Where should I add the -a?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Configuring NRPE client CentOS7

Post by ssax »

With this definition:

Code: Select all

$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
You would need to go to Configure > Core Config Manager > Services in the XI server and add this to your $ARG2$:

Code: Select all

-a 'elasticsearch'
Save, Apply Config, Test, let us know the results.

$ARG1$ is your NRPE command, $ARG2$ is a placeholder for anything else you want to pass such as arguments or any other check_nrpe argument from:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -h
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Configuring NRPE client CentOS7

Post by rferebee »

So, can I just do this?

$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ -a $ARG2$
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 »

I would highly recommend this

Code: Select all

$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
then is your services youu would set
$ARG1$ =

Code: Select all

check_services
$ARG2$ =

Code: Select all

-a 'elasticsearch'
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 »

This thread can be closed. Thank you.
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:This thread can be closed. Thank you.
Great!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked