Icinga DB: Add `service_state.host_id` to Redis

This commit is contained in:
Yonas Habteab 2021-11-05 19:00:41 +01:00 committed by Eric Lippmann
parent 5dc45baebb
commit fe5aa1e18d
1 changed files with 1 additions and 0 deletions

View File

@ -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;