apply Service "tcp port " for ( port in host.vars.tcp_ipv4 ) to Host { check_command = "tcp" vars.tcp_ipv4 = "true" vars.tcp_port = port assign where host.address }