From fe5aa1e18d6fd552d0a76ac6099326b40aaf2fbd Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Fri, 5 Nov 2021 19:00:41 +0100 Subject: [PATCH] Icinga DB: Add `service_state.host_id` to Redis --- lib/icingadb/icingadb-objects.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index d8f5e7cc8..38b405a3b 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -2203,6 +2203,7 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable) attrs->Set("state", state); attrs->Set("hard_state", service->HasBeenChecked() ? service->GetLastHardState() : 99); attrs->Set("severity", service->GetSeverity()); + attrs->Set("host_id", GetObjectIdentifier(host)); } else { attrs->Set("host_id", id); auto state = host->HasBeenChecked() ? host->GetState() : 99;