mirror of https://github.com/Icinga/icinga2.git
Bugfix: The delegation component should use only non-local checker endpoints.
This commit is contained in:
parent
ec0e319d8a
commit
26da51e071
|
@ -44,8 +44,13 @@ vector<Endpoint::Ptr> DelegationComponent::GetCheckerCandidates(const Service::P
|
|||
BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) {
|
||||
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
|
||||
|
||||
/* ignore local-only endpoints */
|
||||
if (endpoint->IsLocal())
|
||||
continue;
|
||||
|
||||
/* ignore disconnected endpoints */
|
||||
if (!endpoint->IsConnected())
|
||||
if (!endpoint->IsConnected() &&
|
||||
endpoint->GetName() != EndpointManager::GetInstance()->GetIdentity())
|
||||
continue;
|
||||
|
||||
/* ignore endpoints that aren't running the checker component */
|
||||
|
@ -70,6 +75,9 @@ void DelegationComponent::DelegationTimerHandler(void)
|
|||
BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) {
|
||||
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
|
||||
|
||||
if (endpoint->IsLocal())
|
||||
continue;
|
||||
|
||||
histogram[endpoint] = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue