mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Fix lag calculation for the 'cluster-zone' check
This commit is contained in:
parent
3615716983
commit
c9c7f9bed1
@ -86,13 +86,11 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
|
|||||||
BOOST_FOREACH(const Endpoint::Ptr& endpoint, zone->GetEndpoints()) {
|
BOOST_FOREACH(const Endpoint::Ptr& endpoint, zone->GetEndpoints()) {
|
||||||
double eplag = Utility::GetTime() - endpoint->GetRemoteLogPosition();
|
double eplag = Utility::GetTime() - endpoint->GetRemoteLogPosition();
|
||||||
|
|
||||||
if (eplag > lag)
|
if (endpoint->IsConnected())
|
||||||
lag = eplag;
|
|
||||||
|
|
||||||
if (endpoint->IsConnected()) {
|
|
||||||
connected = true;
|
connected = true;
|
||||||
break;
|
|
||||||
}
|
if ((endpoint->GetSyncing() || !endpoint->IsConnected()) && eplag > lag)
|
||||||
|
lag = eplag;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user