Invert connected check

refs #6505
This commit is contained in:
Christopher Schirner 2018-07-31 10:40:54 +02:00 committed by Michael Friedrich
parent b9f26bc59f
commit 7231e9db9f
1 changed files with 4 additions and 4 deletions

View File

@ -122,12 +122,12 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
bytesReceivedPerSecond += endpoint->GetBytesReceivedPerSecond();
}
if (!connected) {
cr->SetState(ServiceCritical);
cr->SetOutput("Zone '" + zoneName + "' is not connected. Log lag: " + Utility::FormatDuration(zoneLag));
} else {
if (connected) {
cr->SetState(ServiceOK);
cr->SetOutput("Zone '" + zoneName + "' is connected. Log lag: " + Utility::FormatDuration(zoneLag));
} else {
cr->SetState(ServiceCritical);
cr->SetOutput("Zone '" + zoneName + "' is not connected. Log lag: " + Utility::FormatDuration(zoneLag));
}
/* Check whether the thresholds have been resolved and compare them */