mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
IcingaDB#SerializeState(): correct Checkable#is_{problem,handled}
refs #7673
This commit is contained in:
parent
798c56b809
commit
5c45c198ff
@ -1697,9 +1697,8 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable)
|
|||||||
attrs->Set("check_source", cr->GetCheckSource());
|
attrs->Set("check_source", cr->GetCheckSource());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isProblem = checkable->HasBeenChecked() && !checkable->IsStateOK(checkable->GetStateRaw());
|
attrs->Set("is_problem", checkable->GetProblem());
|
||||||
attrs->Set("is_problem", isProblem);
|
attrs->Set("is_handled", checkable->GetHandled());
|
||||||
attrs->Set("is_handled", isProblem && (checkable->IsInDowntime() || checkable->IsAcknowledged()));
|
|
||||||
attrs->Set("is_reachable", checkable->IsReachable());
|
attrs->Set("is_reachable", checkable->IsReachable());
|
||||||
attrs->Set("is_flapping", checkable->IsFlapping());
|
attrs->Set("is_flapping", checkable->IsFlapping());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user