Question regarding Director and a nrpe check


First of all I’m running Icinga 2.7.3 on RHEL8 with Director 1.7.2 installed.

So I created this command which basically is supposed to send a check command and arguments to the remote host.

But for some reason the argument is sent before the check which makes the check doesn’t work.

It prints out the command like this:
‘/usr/lib64/nagios/plugins/check_nrpe’ ‘-H’ ‘host’ ‘-a’ ‘ARGUMENT 0 99 2500 20000’ ‘-c’ ‘check_command_on_remote_host’

When I run this manually on the icinga machine switching place for -a and -c it does work.

So why does it send the argument before the check command and is there any way to actually decide which order to send the different arguments?

I don’t really know which is best practice to set these checks up but I created a command where I’ve manually stamped the arguments -H $$ -a $ARG1$ 0 99 2500 20000 and -c check_command_on_remote_host, created a service template which has the command and then in a specific service set I add the service and the arguments.


nrpe is an already defined command inside the ITL. If you ran the kickstart wizard of the Director, you should already have this inside your external command definitions.
create a service template using this command to execute the checks.
Only thing you will need to do is configure the variable fields (either on the command or the service template) and then change the type of the data field nrpe_arguments from String to Array (Example: Check Drive Size)
If you have any trouble, post snippets of your config to give more insights.

1 Like


Thanks for the reply! Yes, that is true, I just found it funny that it switched place so it sent the command after the argument.

But the funny things is I just wiped the service set, the service template and the command and set them up again and then it worked.

I guess there was something fishy that was still in the config even though I put in the same configuration that I did previously. But not it works just fine.