Fix cluster check output.

Fixes #6244
This commit is contained in:
Michael Friedrich 2014-05-20 12:28:50 +02:00
parent 52f4d7a5f7
commit 1961c5dfe2
1 changed files with 4 additions and 4 deletions

View 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);