Apply Rule in the Director

Hello to All,

does anyone happen to have a hint as to whether I can map the following Apply Rule in the Director:

apply Service for ( server => port in host.vars.test.prod) {
check_command = “http”
name = “app_test_prod_check_http_” + server
vars.http_port = port
vars.http_uri = “/ping/”
vars.http_vhost = host.name
assign where “test” in host.groups
}

Thanks to all

Should work, I guess:
https://icinga.com/docs/director/latest/doc/15-Service-apply-for-example/

Haven’t tried it myself though.

Yes, that’s possible. Just refer to the variable holding the array of ports in the apply for field.

Did you try it already and it fails? If yes, please share further details and let us know what you tried already.