How do I get check_nrpe to work without -n option?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nelsonw
Posts: 64
Joined: Wed Feb 22, 2017 4:03 am

How do I get check_nrpe to work without -n option?

Post by nelsonw »

Hi,

I am very interested in purchasing NagiosXI, but cannot get check_nrpe to work. Please can you help.


I cannot pass the -n option when setting up the check_nrpe service within NagiosXI. The command it provides me in NagiosXI GUI is

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

However, when passing -n option as $ARG2, I get a "FAILED" return code, even though my command defined in $ARG1 is set up to success.
If I run check_nrpe from the command line and put the -n option between the -t and -c arguments, I get the correct results

Please advise either
a) How I can pass the -n option between the -t and -c options from within NagiosXI GUI

or

b) Avoid the need for running check_nrpe with the -n option. Currently, if I exclude -n, check_nrpe returns
CHECK_NRPE: Socket timeout after 30 seconds.

My configuration settings in nsclient.ini are

; TODO
[/settings/NRPE/server]

; Undocumented key
ssl options = no-sslv2,no-sslv3

; Undocumented key
verify mode = peer-cert

; PORT NUMBER - Port to use for NRPE.
port = 5666

; EXTENDED RESPONSE - Send more then 1 return packet to allow response to go beyond payload size (requires modified client

if legacy is true this defaults to false).
extended response = 1

; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = false

; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to

commands that are executed.
allow arguments = true

; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in

|`&><'"\[]{}) characters in arguments.
allow nasty characters = true

; ALLOW INSECURE CHIPHERS and ENCRYPTION - Only enable this if you are using legacy check_nrpe client.
insecure = true

; TODO
[/modules]
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How do I get check_nrpe to work without -n option?

Post by mcapra »

nelsonw wrote: a) How I can pass the -n option between the -t and -c options from within NagiosXI GUI
You could alter the check_nrpe command definition itself in the Core Config Manager:
2017_02_22_14_58_02_CCM_Nagios_XI.png
Or instead you could try the check_nrpe_no_ssl command.
nelsonw wrote: b) Avoid the need for running check_nrpe with the -n option. Currently, if I exclude -n, check_nrpe returns
CHECK_NRPE: Socket timeout after 30 seconds.
Try changing the following directive in your NSClient++ configuration under [/settings/NRPE/server] to true:

Code: Select all

use ssl = true
Then restarting the NSClient++ service (nscp).
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
nelsonw
Posts: 64
Joined: Wed Feb 22, 2017 4:03 am

Re: How do I get check_nrpe to work without -n option?

Post by nelsonw »

Thanks. Please let me know where I can find check_nrpe_no_ssl. I cannot see it in the list of commands in NagiosXI or when searching plugins on Nagios Exchange
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How do I get check_nrpe to work without -n option?

Post by mcapra »

Whoops, that's a custom command. It's just using a wrapper script to call check_nrpe with -n anyway. You could copy the check_nrpe command, rename it check_nrpe_no_ssl, and add the -n argument to achieve the same effect.
2017_02_22_16_12_54_CCM_Nagios_XI.png
2017_02_22_16_13_09_CCM_Nagios_XI.png
2017_02_22_16_14_21_CCM_Nagios_XI.png
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
nelsonw
Posts: 64
Joined: Wed Feb 22, 2017 4:03 am

Re: How do I get check_nrpe to work without -n option?

Post by nelsonw »

Thanks, that worked
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How do I get check_nrpe to work without -n option?

Post by cdienger »

Glad to hear : ) Are we okay closing the thread or do you have any more questions related to this?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked