mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Fix is_handled
This commit is contained in:
parent
328adf1fc4
commit
e2caa47f18
@ -663,13 +663,7 @@ Dictionary::Ptr RedisWriter::SerializeState(const Checkable::Ptr& checkable)
|
|||||||
|
|
||||||
bool isProblem = !checkable->IsStateOK(checkable->GetStateRaw());
|
bool isProblem = !checkable->IsStateOK(checkable->GetStateRaw());
|
||||||
attrs->Set("is_problem", isProblem);
|
attrs->Set("is_problem", isProblem);
|
||||||
|
attrs->Set("is_handled", isProblem && (checkable->IsInDowntime() || checkable->IsAcknowledged()));
|
||||||
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_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