From 19315010406a272457cab7803943c902153fb257 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 3 Dec 2019 16:56:43 +0100 Subject: [PATCH] Checkable#GetProblem(): consider PENDING not a problem --- lib/icinga/checkable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp index 0ab090284..36a5a6c79 100644 --- a/lib/icinga/checkable.cpp +++ b/lib/icinga/checkable.cpp @@ -160,7 +160,9 @@ int Checkable::GetSeverity() const bool Checkable::GetProblem() const { - return !IsStateOK(GetStateRaw()); + auto cr (GetLastCheckResult()); + + return cr && !IsStateOK(cr->GetState()); } bool Checkable::GetHandled() const