IcingaConfig: workaround for no host in service

This commit is contained in:
Thomas Gelf 2016-09-08 20:13:45 +00:00
parent b2b189c425
commit 646a7dc067
1 changed files with 8 additions and 0 deletions

View File

@ -473,6 +473,14 @@ class IcingaConfig
const DirectorVarsOverride = "%s" const DirectorVarsOverride = "%s"
template Service "%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) { if (vars) {
vars += host.vars[DirectorVarsOverride][name] vars += host.vars[DirectorVarsOverride][name]
} else { } else {