]> granicus.if.org Git - icinga2/commitdiff
Fix cluster check output.
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 20 May 2014 10:28:50 +0000 (12:28 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 20 May 2014 10:28:50 +0000 (12:28 +0200)
Fixes #6244

lib/methods/clusterchecktask.cpp

index 199adce8a12eabdc313297867103e2e8eacf2aaf..ff69a40df7753e8d76160d228de6cdec6858661a 100644 (file)
@@ -60,12 +60,12 @@ void ClusterCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRe
 
        if (status->Get("num_not_conn_endpoints") > 0) {
                cr->SetState(ServiceCritical);
-               cr->SetOutput("Icinga 2 Cluster is running: Connected Endpoints: "+ Convert::ToString(status->Get("num_conn_endpoints")) + " (" +
-           connected_endpoints + ").");
-       } else {
-               cr->SetState(ServiceOK);
                cr->SetOutput("Icinga 2 Cluster Problem: " + Convert::ToString(status->Get("num_not_conn_endpoints")) +
                    " Endpoints (" + not_connected_endpoints + ") not connected.");
+       } else {
+               cr->SetState(ServiceOK);
+               cr->SetOutput("Icinga 2 Cluster is running: Connected Endpoints: "+ Convert::ToString(status->Get("num_conn_endpoints")) +
+                   " (" + connected_endpoints + ").");
        }
 
        checkable->ProcessCheckResult(cr);