Service apply rules and custom properties


I’m facing an unexpected behavior with Director apply rules (see screenshot below). With that config, the service name is applied properly in Icinga2 (e.g. wan-eth4) but the snmp_interface variable is ignored, and the corresponding command argument (-n, I’m using Manubulon check scripts) is not passed to the command at all, resulting in a failure.

The interfaces_wan variable is an array of dictionaries (interface name, 64bit-counter boolean, bandwidth, etc.). I’ll need all those variables later on, but I need to get the name working first.

If I use a fixed value for snmp_interface (e.g. “foobar”) or leave it empty to use default template value (“dummy”), that value will be applied to the variable and properly passed to the command argument. This makes me think that the $$ macro is considered empty when the snmp_interface variable is evaluated, but the odd part is that the exact same macro works fine for service name… any clues? Am I doing something wrong?

  • Director version : 1.10.0
  • Icinga Web 2 version and modules : 2.11.1
  • Icinga 2 version : r2.13.5-1

Thanks in advance!