From ae18536b0f20dbe05448f2407f128a9b8bf324fe Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 11 Apr 2019 11:25:45 +0200 Subject: [PATCH] Service: be handled while host is down --- lib/icinga/service.cpp | 5 +++++ lib/icinga/service.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index 0b52298f5..99a479647 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -133,6 +133,11 @@ int Service::GetSeverity() const return severity; } +bool Service::GetHandled() const +{ + return Checkable::GetHandled() || m_Host->GetProblem(); +} + bool Service::IsStateOK(ServiceState state) const { return state == ServiceOK; diff --git a/lib/icinga/service.hpp b/lib/icinga/service.hpp index 8453e8506..0e6e4d8d3 100644 --- a/lib/icinga/service.hpp +++ b/lib/icinga/service.hpp @@ -29,6 +29,7 @@ public: Host::Ptr GetHost() const override; int GetSeverity() const override; + bool GetHandled() const override; bool ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Value *result) const override;