mirror of https://github.com/Icinga/icinga2.git
Set parent_host_name in Dependency objects to the host's name for apply rules.
Fixes #6197
This commit is contained in:
parent
4e35c39df0
commit
d5f5d7b0a2
|
@ -68,6 +68,11 @@ bool Dependency::EvaluateApplyRule(const Checkable::Ptr& checkable, const ApplyR
|
|||
builder->SetName(rule.GetName());
|
||||
builder->SetScope(rule.GetScope());
|
||||
|
||||
builder->AddExpression(make_shared<AExpression>(&AExpression::OpSet,
|
||||
make_shared<AExpression>(&AExpression::OpLiteral, "parent_host_name", di),
|
||||
make_shared<AExpression>(&AExpression::OpLiteral, host->GetName(), di),
|
||||
di));
|
||||
|
||||
builder->AddExpression(make_shared<AExpression>(&AExpression::OpSet,
|
||||
make_shared<AExpression>(&AExpression::OpLiteral, "child_host_name", di),
|
||||
make_shared<AExpression>(&AExpression::OpLiteral, host->GetName(), di),
|
||||
|
|
Loading…
Reference in New Issue