diff --git a/lib/db_ido/hostdbobject.cpp b/lib/db_ido/hostdbobject.cpp index 9bb7fcdba..f3e20f2e3 100644 --- a/lib/db_ido/hostdbobject.cpp +++ b/lib/db_ido/hostdbobject.cpp @@ -135,6 +135,7 @@ Dictionary::Ptr HostDbObject::GetStatusFields(void) const fields->Set("check_type", CompatUtility::GetCheckableCheckType(host)); fields->Set("last_state_change", DbValue::FromTimestamp(host->GetLastStateChange())); fields->Set("last_hard_state_change", DbValue::FromTimestamp(host->GetLastHardStateChange())); + fields->Set("last_hard_state", host->GetLastHardState()); fields->Set("last_time_up", DbValue::FromTimestamp(static_cast(host->GetLastStateUp()))); fields->Set("last_time_down", DbValue::FromTimestamp(static_cast(host->GetLastStateDown()))); fields->Set("last_time_unreachable", DbValue::FromTimestamp(static_cast(host->GetLastStateUnreachable()))); diff --git a/lib/db_ido/servicedbobject.cpp b/lib/db_ido/servicedbobject.cpp index e8df83393..15117675e 100644 --- a/lib/db_ido/servicedbobject.cpp +++ b/lib/db_ido/servicedbobject.cpp @@ -130,6 +130,7 @@ Dictionary::Ptr ServiceDbObject::GetStatusFields(void) const fields->Set("check_type", CompatUtility::GetCheckableCheckType(service)); fields->Set("last_state_change", DbValue::FromTimestamp(service->GetLastStateChange())); fields->Set("last_hard_state_change", DbValue::FromTimestamp(service->GetLastHardStateChange())); + fields->Set("last_hard_state", service->GetLastHardState()); fields->Set("last_time_ok", DbValue::FromTimestamp(static_cast(service->GetLastStateOK()))); fields->Set("last_time_warning", DbValue::FromTimestamp(static_cast(service->GetLastStateWarning()))); fields->Set("last_time_critical", DbValue::FromTimestamp(static_cast(service->GetLastStateCritical())));