Icinga DB: icinga:*:state: rename state to soft_state

This commit is contained in:
Alexander A. Klimov 2022-06-29 11:49:06 +02:00
parent 4522522444
commit ba9a5c614c
1 changed files with 2 additions and 2 deletions

View File

@ -2548,14 +2548,14 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable)
if (service) {
attrs->Set("service_id", id);
auto state = service->HasBeenChecked() ? service->GetState() : 99;
attrs->Set("state", state);
attrs->Set("soft_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;
attrs->Set("state", state);
attrs->Set("soft_state", state);
attrs->Set("hard_state", host->HasBeenChecked() ? host->GetLastHardState() : 99);
attrs->Set("severity", host->GetSeverity());
}