mirror of
https://github.com/Icinga/icinga2.git
synced 2025-06-25 16:10:19 +02:00
Bugfixes, additional output for delegations.
This commit is contained in:
parent
1d7a3f6c75
commit
e8a44ad2fb
@ -142,9 +142,17 @@ void CheckerComponent::ResultTimerHandler(void)
|
|||||||
Application::Log(LogWarning, "checker", latwarn.str());
|
Application::Log(LogWarning, "checker", latwarn.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
stringstream msgbuf;
|
{
|
||||||
msgbuf << "ResultTimerHandler: " << results << " results (" << failed << " failed); latency: avg=" << avg_latency / (results ? results : 1) << ", min=" << min_latency << ", max: " << max_latency;
|
stringstream msgbuf;
|
||||||
Application::Log(LogInformation, "checker", msgbuf.str());
|
msgbuf << "ResultTimerHandler: " << results << " results (" << failed << " failed); latency: avg=" << avg_latency / (results ? results : 1) << ", min=" << min_latency << ", max: " << max_latency;
|
||||||
|
Application::Log(LogInformation, "checker", msgbuf.str());
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
stringstream msgbuf;
|
||||||
|
msgbuf << "Pending services: " << m_PendingServices.size() << "; idle services: " << m_Services.size();
|
||||||
|
Application::Log(LogInformation, "checker", msgbuf.str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckerComponent::AssignServiceRequestHandler(const Endpoint::Ptr& sender, const RequestMessage& request)
|
void CheckerComponent::AssignServiceRequestHandler(const Endpoint::Ptr& sender, const RequestMessage& request)
|
||||||
|
@ -100,6 +100,11 @@ vector<Endpoint::Ptr> DelegationComponent::GetCheckerCandidates(const Service& s
|
|||||||
for (it = GetEndpointManager()->Begin(); it != GetEndpointManager()->End(); it++) {
|
for (it = GetEndpointManager()->Begin(); it != GetEndpointManager()->End(); it++) {
|
||||||
Endpoint::Ptr endpoint = it->second;
|
Endpoint::Ptr endpoint = it->second;
|
||||||
|
|
||||||
|
/* ignore disconnected endpoints */
|
||||||
|
if (!endpoint->IsConnected())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* ignore endpoints that aren't running the checker component */
|
||||||
if (!endpoint->HasSubscription("checker::AssignService"))
|
if (!endpoint->HasSubscription("checker::AssignService"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -246,6 +251,13 @@ void DelegationComponent::DelegationTimerHandler(void)
|
|||||||
|
|
||||||
AssignService(endpoint, *sit);
|
AssignService(endpoint, *sit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
map<Endpoint::Ptr, int>::iterator hit;
|
||||||
|
for (hit = histogram.begin(); hit != histogram.end(); hit++) {
|
||||||
|
stringstream msgbuf;
|
||||||
|
msgbuf << "histogram: " << hit->first->GetIdentity() << " - " << hit->second;
|
||||||
|
Application::Log(LogInformation, "delegation", msgbuf.str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stringstream msgbuf;
|
stringstream msgbuf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user