Understanding Director command arguments with DSL

I think you need to use the macro function: Library Reference - Icinga 2

I have no example for exactly this at the moment, but an example that shows the general capabilities: Director - use function for timebased threshold - #4 by dgoetz