I don't use the director, but I can tell you how I do this in normal code.
Basically I'd create some dict / list, as you said (at various scopes). There you have to put variables there - those ones you want to change (so for example URL).
So you define a variable with your data. It can be under host, or you can create it in the global scope.
globals.http_urls = [ "/uril1", "/url2" ]
or
object Host "testhost" {
host.address = 123.123.123.123
vars.http_urls = [ "/url1", "/url2" ]
}
then you can iterate over that variable
apply Service "http-url" for (url in globals.http_url) {
command = http
# ... other http check variables ...
vars.http_url = url
# ... other variables ...
assign where host.name == "testhost"
}
you can also iterate over the dictionary, it works like that:
globals.testdict = {
"server1" : "testdict",
"server2" : "testweb",
etc..
}
just use key => value format in for definition
apply Service "http-url" for (server => url in globals.testdict) {
command = http
display_name = "http check " + server
vars.http_url = url
.. etc
assign where host.name == testserver
}