Create negated host check within Director


I tried to create a negated hostalive check by wrapping the hostalive check with the negate check.
First added the needed custom vars ($negate_command,$negate_arguments,…), created a new command with import of “negate” command and applying the command to host via host template.

If I understood the wrapping from negate (default config from plugin), it should take the values from $negate_command and $negate_arguments and append them after the common options.
The executed command should look like this
‘/path/negate’ ‘-o’ ‘WARNING’ ‘/path/check_ping’ ‘-H’ ‘x.x.x.x’ ‘-w’ ‘a,b’ ‘-c’ ‘b,c’
$negate_arguments=’-H’ ‘x.x.x.x’ ‘-w’ ‘a,b’ ‘-c’ ‘b,c’

After deploying the check, icinga2 was not able to expand the variables.
I’ve already tried several variable types (string, array) and syntax ( with ", comma separated, …),
but nothing works.

Any ideas?


icinga2 2.10.4
director (only reports version master, files from Nov 18)
php 7.2