From 38eaf4036b51d9f96010866021e7a661edad91d8 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 9 Oct 2016 13:27:38 +0000 Subject: [PATCH] IcingaHost: agent-related hint for legacy config --- library/Director/Objects/IcingaHost.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaHost.php b/library/Director/Objects/IcingaHost.php index e8cd776a..65837de8 100644 --- a/library/Director/Objects/IcingaHost.php +++ b/library/Director/Objects/IcingaHost.php @@ -159,7 +159,12 @@ class IcingaHost extends IcingaObject public function renderToConfig(IcingaConfig $config) { parent::renderToConfig($config); - $this->renderAgentZoneAndEndpoint($config); + + // TODO: We might alternatively let the whole config fail in case we have + // used use_agent together with a legacy config + if (! $config->isLegacy()) { + $this->renderAgentZoneAndEndpoint($config); + } } public function renderAgentZoneAndEndpoint(IcingaConfig $config = null)