livestatus: add last_time_* to host and service table

refs #4372
This commit is contained in:
Michael Friedrich 2013-07-18 18:17:25 +02:00
parent 2ebf0822ac
commit 446d9ad7c6
2 changed files with 7 additions and 14 deletions

View File

@ -800,20 +800,17 @@ Value HostsTable::LastStateChangeAccessor(const Value& row)
Value HostsTable::LastTimeUpAccessor(const Value& row) Value HostsTable::LastTimeUpAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Host::Ptr>(row)->GetLastStateUp());
return Empty;
} }
Value HostsTable::LastTimeDownAccessor(const Value& row) Value HostsTable::LastTimeDownAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Host::Ptr>(row)->GetLastStateDown());
return Empty;
} }
Value HostsTable::LastTimeUnreachableAccessor(const Value& row) Value HostsTable::LastTimeUnreachableAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Host::Ptr>(row)->GetLastStateUnreachable());
return Empty;
} }
Value HostsTable::IsFlappingAccessor(const Value& row) Value HostsTable::IsFlappingAccessor(const Value& row)

View File

@ -481,26 +481,22 @@ Value ServicesTable::NoMoreNotificationsAccessor(const Value& row)
Value ServicesTable::LastTimeOkAccessor(const Value& row) Value ServicesTable::LastTimeOkAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateOK());
return Empty;
} }
Value ServicesTable::LastTimeWarningAccessor(const Value& row) Value ServicesTable::LastTimeWarningAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateWarning());
return Empty;
} }
Value ServicesTable::LastTimeCriticalAccessor(const Value& row) Value ServicesTable::LastTimeCriticalAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateCritical());
return Empty;
} }
Value ServicesTable::LastTimeUnknownAccessor(const Value& row) Value ServicesTable::LastTimeUnknownAccessor(const Value& row)
{ {
/* TODO */ return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateUnknown());
return Empty;
} }
Value ServicesTable::LastCheckAccessor(const Value& row) Value ServicesTable::LastCheckAccessor(const Value& row)