Fix is_handled

This commit is contained in:
Jean Flach 2018-11-27 11:03:35 +01:00 committed by Michael Friedrich
parent 328adf1fc4
commit e2caa47f18
1 changed files with 1 additions and 7 deletions

View File

@ -663,13 +663,7 @@ Dictionary::Ptr RedisWriter::SerializeState(const Checkable::Ptr& checkable)
bool isProblem = !checkable->IsStateOK(checkable->GetStateRaw());
attrs->Set("is_problem", isProblem);
bool isHandledNoDependency = isProblem && checkable->IsInDowntime() && checkable->IsAcknowledged();
if (service)
attrs->Set("is_handled", isHandledNoDependency && !checkable->IsStateOK(service->GetHost()->GetStateRaw()));
else
attrs->Set("is_handled", isHandledNoDependency);
attrs->Set("is_handled", isProblem && (checkable->IsInDowntime() || checkable->IsAcknowledged()));
attrs->Set("is_reachable", checkable->IsReachable());
attrs->Set("is_flapping", checkable->IsFlapping());