From 7231e9db9f119cdcff685c0dddfc974420250eac Mon Sep 17 00:00:00 2001 From: Christopher Schirner Date: Tue, 31 Jul 2018 10:40:54 +0200 Subject: [PATCH] Invert connected check refs #6505 --- lib/methods/clusterzonechecktask.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/methods/clusterzonechecktask.cpp b/lib/methods/clusterzonechecktask.cpp index 76a6fb2b2..b5a317f8b 100644 --- a/lib/methods/clusterzonechecktask.cpp +++ b/lib/methods/clusterzonechecktask.cpp @@ -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 */ -- 2.40.0