Am 08.02.2015 um 21:15 schrieb Michael Friedrich:
> Am Sonntag, 8. Februar 2015 schrieb Dustin Funk :
> 
>     Hi,
> 
> 
>     can i write the following dependency definitions in a shorter way?
> 
> 
>     object Host "d-switch-1" {
>       import "generic-host"
>       address = "10.42.49.1"
>       vars.parent = "host-remote"
>     }
> 
>     object Host "d-switch-2" {
>       import "generic-host"
>       address = "10.42.49.2"
>       vars.parent = "d-switch-1"
>     }
> 
>     object Host "d-switch-3" {
>       import "generic-host"
>       address = "10.42.49.3"
>       vars.parent = "d-switch-2"
>     }
> 
>     apply Dependency "switche" to Host {
>     #  parent_host_name = "$vars.parent$"
>       parent_host_name = "d-switch-1"
>       assign where host.vars.parent == "d-switch-1"
>     }
> 
> 
> Using 2.2.x try

Sorry, 2.2.4.

> 
> parent_host_name = host.vars.parent

I try the following lines:

apply Dependency "switche" to Host {
   parent_host_name = "$host.vars.parent$"
#  parent_host_name = "d-switch-1"
  assign where host.vars.parent
}

The log tell me that the assign is ok (3 times) but

critical/config:
Config error: Invalid value for attribute: Object 'switche' (Type:
'Dependency') at /etc/icinga2/conf.d/switche/passive-technik.conf:22 ->$
critical/config:
Config error: Invalid value for attribute: Object 'switche' (Type:
'Dependency') at /etc/icinga2/conf.d/switche/passive-technik.conf:22 ->$
critical/config:
Config error: Invalid value for attribute: Object 'switche' (Type:
'Dependency') at /etc/icinga2/conf.d/switche/passive-technik.conf:22 ->$
critical/config: 3 errors, 0 warnings.

Cheers
  nuts

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to