MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EvaluateApplyRules

Method EvaluateApplyRules

lib/icinga/notification-apply.cpp:133–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void Notification::EvaluateApplyRules(const Host::Ptr& host)
134{
135 CONTEXT("Evaluating 'apply' rules for host '" << host->GetName() << "'");
136
137 for (auto& rule : ApplyRule::GetRules(Notification::TypeInstance, Host::TypeInstance))
138 {
139 if (EvaluateApplyRule(host, *rule))
140 rule->AddMatch();
141 }
142
143 for (auto& rule : ApplyRule::GetTargetedHostRules(Notification::TypeInstance, host->GetName())) {
144 if (EvaluateApplyRule(host, *rule, true))
145 rule->AddMatch();
146 }
147}
148
149void Notification::EvaluateApplyRules(const Service::Ptr& service)
150{

Callers

nothing calls this directly

Calls 3

AddMatchMethod · 0.80
GetNameMethod · 0.45
GetHostMethod · 0.45

Tested by

no test coverage detected