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 $host.name$ -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.