IcingaConfig: workaround for no host in service
This commit is contained in:
parent
b2b189c425
commit
646a7dc067
|
@ -473,6 +473,14 @@ class IcingaConfig
|
|||
const DirectorVarsOverride = "%s"
|
||||
|
||||
template Service "%s" {
|
||||
/**
|
||||
* Seems that host is missing when used in a service object, works fine for
|
||||
* apply rules
|
||||
*/
|
||||
if (! host) {
|
||||
var host = get_host(host_name)
|
||||
}
|
||||
|
||||
if (vars) {
|
||||
vars += host.vars[DirectorVarsOverride][name]
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue