IcingaDB#SerializeState(): correct Checkable#is_{problem,handled}

refs #7673
This commit is contained in:
Alexander A. Klimov 2019-12-03 17:44:48 +01:00
parent 798c56b809
commit 5c45c198ff
1 changed files with 2 additions and 3 deletions

View File

@ -1697,9 +1697,8 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable)
attrs->Set("check_source", cr->GetCheckSource());
}
bool isProblem = checkable->HasBeenChecked() && !checkable->IsStateOK(checkable->GetStateRaw());
attrs->Set("is_problem", isProblem);
attrs->Set("is_handled", isProblem && (checkable->IsInDowntime() || checkable->IsAcknowledged()));
attrs->Set("is_problem", checkable->GetProblem());
attrs->Set("is_handled", checkable->GetHandled());
attrs->Set("is_reachable", checkable->IsReachable());
attrs->Set("is_flapping", checkable->IsFlapping());