diff --git a/library/Director/Objects/IcingaService.php b/library/Director/Objects/IcingaService.php index 2d9deb3d..27168d1f 100644 --- a/library/Director/Objects/IcingaService.php +++ b/library/Director/Objects/IcingaService.php @@ -168,7 +168,11 @@ class IcingaService extends IcingaObject return ''; } - return $this->renderRelationProperty('host', $this->host_id, 'command_endpoint'); + if ($this->hasBeenAssignedToHostTemplate()) { + return c::renderKeyValue('command_endpoint', 'host.name'); + } else { + return $this->renderRelationProperty('host', $this->host_id, 'command_endpoint'); + } } /**