Service rule with labled interfaces

Hello all,
I am in the process of converting our Icinga from cofiguration files to director.
I have a service rule here that I can’t get converted.

apply Service "Iftraffic: " for (int => config in{
        import "generic-service
        check_command = "check_iftraffic"
        vars += config
        assign where

In the host file this is then used as follows.

object Host "sw-01" {
        import "generic-host

        address = ""
        zone = "master"
        vars.hostgroup = "prod-net"["to-sw-02"] = {
                int = "TenGigabitEthernet1/0/1"
        }["to-sw-03"] = {
                int = "TenGigabitEthernet1/0/2"
        }["ro-host-01"] = {
                int = "TenGigabitEthernet1/0/3"

In my Grafana dashboard, I then have a digram for each interface.
I have already seen the example with the interface array in the documentation and tried it out.

However, with the previous solution, I like that I can add labels to the interfaces which makes for a better overview.

Can this also be replicated in the Director?


Maybe this doc helps ? icingaweb2-module-director/ at master · Icinga/icingaweb2-module-director · GitHub
Don’t have a better tip right now, because I don’t use the director ^^

you could write a wrapper script for check_iftraffic that executes check_iftraffic for each interface, and with this option there is just one service