diff --git a/lib/icinga/apievents.cpp b/lib/icinga/apievents.cpp index be235d38f..9e898cae4 100644 --- a/lib/icinga/apievents.cpp +++ b/lib/icinga/apievents.cpp @@ -193,7 +193,10 @@ Value ApiEvents::CheckResultAPIHandler(const MessageOrigin& origin, const Dictio if (origin.FromZone && !origin.FromZone->CanAccessObject(checkable) && endpoint != checkable->GetCommandEndpoint()) return Empty; - checkable->ProcessCheckResult(cr, origin); + if (endpoint == checkable->GetCommandEndpoint()) + checkable->ProcessCheckResult(cr); + else + checkable->ProcessCheckResult(cr, origin); return Empty; } diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 0688e93fb..13f0b2808 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -268,25 +268,6 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig /* send message back to its origin */ Dictionary::Ptr message = ApiEvents::MakeCheckResultMessage(this, cr); listener->SyncSendMessage(command_endpoint, message); - - /* HA cluster zone nodes must also process the check result locally - * by fetching the real host/service object if existing - */ - Host::Ptr tempHost; - Service::Ptr tempService; - tie(tempHost, tempService) = GetHostService(this); - Host::Ptr realHost = Host::GetByName(tempHost->GetName()); - if (realHost) { - Value agent_service_name = GetExtension("agent_service_name"); - if (!agent_service_name.IsEmpty()) { - Checkable::Ptr realCheckable; - realCheckable = realHost->GetServiceByShortName(agent_service_name); - if (realCheckable) { - realCheckable->ProcessCheckResult(cr, origin); - } - } - } - } return;