From 3f490ac0e28191cf22baf64c8700c7abb8c2b8c6 Mon Sep 17 00:00:00 2001 From: Mattia Codato Date: Wed, 15 Jul 2020 08:37:28 +0200 Subject: [PATCH] Set the right prams to send to ExecutedCommand --- lib/icinga/clusterevents-check.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/icinga/clusterevents-check.cpp b/lib/icinga/clusterevents-check.cpp index 0980a0c2c..555037d17 100644 --- a/lib/icinga/clusterevents-check.cpp +++ b/lib/icinga/clusterevents-check.cpp @@ -165,8 +165,10 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons cr->SetExecutionEnd(pr.ExecutionEnd); Dictionary::Ptr executedParams = new Dictionary(); - params->CopyTo(executedParams); executedParams->Set("execution", params->Get("source")); + executedParams->Set("host", params->Get("host")); + if (params->Contains("service")) + executedParams->Set("service", params->Get("service")); executedParams->Set("check_result", Serialize(cr)); if (origin->IsLocal()) {