From e2caa47f182b057b93bf80b050dca99ff0b61a30 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Tue, 27 Nov 2018 11:03:35 +0100 Subject: [PATCH] Fix is_handled --- lib/redis/rediswriter-objects.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index 280641215..514e1b1ab 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -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());