From: Alexander A. Klimov Date: Thu, 11 Apr 2019 09:25:45 +0000 (+0200) Subject: Service: be handled while host is down X-Git-Tag: v2.11.0-rc1~147^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae18536b0f20dbe05448f2407f128a9b8bf324fe;p=icinga2 Service: be handled while host is down --- 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;