diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php index 60676723..d06f5d0e 100644 --- a/library/Director/IcingaConfig/IcingaConfig.php +++ b/library/Director/IcingaConfig/IcingaConfig.php @@ -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 {