mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
parent
aa88271d5a
commit
5553438249
@ -90,7 +90,7 @@ Dictionary::Ptr HostDbObject::GetStatusFields() const
|
|||||||
|
|
||||||
int currentState = host->GetState();
|
int currentState = host->GetState();
|
||||||
|
|
||||||
if (currentState != HostUp && !host->IsReachable())
|
if (currentState != HostUp && !host->GetLastReachable())
|
||||||
currentState = 2; /* hardcoded compat state */
|
currentState = 2; /* hardcoded compat state */
|
||||||
|
|
||||||
fields->Set("current_state", currentState);
|
fields->Set("current_state", currentState);
|
||||||
@ -122,7 +122,7 @@ Dictionary::Ptr HostDbObject::GetStatusFields() const
|
|||||||
fields->Set("normal_check_interval", host->GetCheckInterval() / 60.0);
|
fields->Set("normal_check_interval", host->GetCheckInterval() / 60.0);
|
||||||
fields->Set("retry_check_interval", host->GetRetryInterval() / 60.0);
|
fields->Set("retry_check_interval", host->GetRetryInterval() / 60.0);
|
||||||
fields->Set("check_timeperiod_object_id", host->GetCheckPeriod());
|
fields->Set("check_timeperiod_object_id", host->GetCheckPeriod());
|
||||||
fields->Set("is_reachable", host->IsReachable());
|
fields->Set("is_reachable", host->GetLastReachable());
|
||||||
fields->Set("original_attributes", JsonEncode(host->GetOriginalAttributes()));
|
fields->Set("original_attributes", JsonEncode(host->GetOriginalAttributes()));
|
||||||
|
|
||||||
fields->Set("current_notification_number", CompatUtility::GetCheckableNotificationNotificationNumber(host));
|
fields->Set("current_notification_number", CompatUtility::GetCheckableNotificationNotificationNumber(host));
|
||||||
|
@ -119,7 +119,7 @@ Dictionary::Ptr ServiceDbObject::GetStatusFields() const
|
|||||||
fields->Set("normal_check_interval", service->GetCheckInterval() / 60.0);
|
fields->Set("normal_check_interval", service->GetCheckInterval() / 60.0);
|
||||||
fields->Set("retry_check_interval", service->GetRetryInterval() / 60.0);
|
fields->Set("retry_check_interval", service->GetRetryInterval() / 60.0);
|
||||||
fields->Set("check_timeperiod_object_id", service->GetCheckPeriod());
|
fields->Set("check_timeperiod_object_id", service->GetCheckPeriod());
|
||||||
fields->Set("is_reachable", service->IsReachable());
|
fields->Set("is_reachable", service->GetLastReachable());
|
||||||
fields->Set("original_attributes", JsonEncode(service->GetOriginalAttributes()));
|
fields->Set("original_attributes", JsonEncode(service->GetOriginalAttributes()));
|
||||||
|
|
||||||
fields->Set("current_notification_number", CompatUtility::GetCheckableNotificationNotificationNumber(service));
|
fields->Set("current_notification_number", CompatUtility::GetCheckableNotificationNotificationNumber(service));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user