Hi nuts,
On 2015-04-14 01:15:43, Dustin Funk wrote:
> object Host "name" {
> import "generic-host"
> address = "111.222.333.444"
>
> vars.dns["dns server"] = {
> dns_lookup = "$address$"
> dns_server = "www.fem.tu-ilmenau.de"
> }
> }
>
> apply Service "dns" for (dns_name => config in host.vars.dns) {
> import "generic-service"
> vars += config
>
> display_name = dns_name
> check_command = "dns"
>
> assign where host.vars.dns
> }I am really anything else than an expert in icinga2 config, but in my understanding, macros are used for accessing variables of *other* objects, whereas you are trying to access a variable of the Host object itself. Maybe you could try to move the line 'dns_lookup = "$address$"' to the Service definition, or access the address variable in the Host object without a macro? Just a wild guess, I have not tried this, and if somebody with better understanding of icinga2 is around, please feel very welcome to correct me ;-) Regards, Michael -- Michael Pfeiffer <[email protected]>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
