DB IDO: Missing last_hard_state column update in {host,service}status tables

fixes #8058
This commit is contained in:
Michael Friedrich 2014-12-12 13:25:10 +01:00
parent a94b26ff47
commit 868d403a8a
2 changed files with 2 additions and 0 deletions

View File

@ -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<int>(host->GetLastStateUp())));
fields->Set("last_time_down", DbValue::FromTimestamp(static_cast<int>(host->GetLastStateDown())));
fields->Set("last_time_unreachable", DbValue::FromTimestamp(static_cast<int>(host->GetLastStateUnreachable())));

View File

@ -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<int>(service->GetLastStateOK())));
fields->Set("last_time_warning", DbValue::FromTimestamp(static_cast<int>(service->GetLastStateWarning())));
fields->Set("last_time_critical", DbValue::FromTimestamp(static_cast<int>(service->GetLastStateCritical())));