Page 4 of 4

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 1:37 pm
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'

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 1:48 pm
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?

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 1:54 pm
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'

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 1:56 pm
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?

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 2:03 pm
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

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 2:43 pm
by rferebee
So, can I just do this?

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

Re: Configuring NRPE client CentOS7

Posted: Fri May 03, 2019 2:47 pm
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'

Re: Configuring NRPE client CentOS7

Posted: Tue May 28, 2019 1:22 pm
by rferebee
This thread can be closed. Thank you.

Re: Configuring NRPE client CentOS7

Posted: Tue May 28, 2019 2:18 pm
by scottwilkerson
rferebee wrote:This thread can be closed. Thank you.
Great!

Locking