fields->Set("process_performance_data", host->GetEnablePerfdata());
- fields->Set("freshness_checks_enabled", CompatUtility::GetCheckableFreshnessChecksEnabled(host));
- fields->Set("freshness_threshold", CompatUtility::GetCheckableFreshnessThreshold(host));
+ fields->Set("freshness_checks_enabled", 1);
+ fields->Set("freshness_threshold", Convert::ToLong(host->GetCheckInterval()));
fields->Set("event_handler_enabled", host->GetEnableEventHandler());
fields->Set("passive_checks_enabled", host->GetEnablePassiveChecks());
fields->Set("active_checks_enabled", host->GetEnableActiveChecks());
fields->Set("low_flap_threshold", service->GetFlappingThresholdLow());
fields->Set("high_flap_threshold", service->GetFlappingThresholdLow());
fields->Set("process_performance_data", service->GetEnablePerfdata());
- fields->Set("freshness_checks_enabled", CompatUtility::GetCheckableFreshnessChecksEnabled(service));
- fields->Set("freshness_threshold", CompatUtility::GetCheckableFreshnessThreshold(service));
+ fields->Set("freshness_checks_enabled", 1);
+ fields->Set("freshness_threshold", Convert::ToLong(service->GetCheckInterval()));
fields->Set("event_handler_enabled", service->GetEnableEventHandler());
fields->Set("passive_checks_enabled", service->GetEnablePassiveChecks());
fields->Set("active_checks_enabled", service->GetEnableActiveChecks());
return "24x7";
}
-int CompatUtility::GetCheckableFreshnessChecksEnabled(const Checkable::Ptr& checkable)
-{
- return (checkable->GetCheckInterval() > 0 ? 1 : 0);
-}
-
-int CompatUtility::GetCheckableFreshnessThreshold(const Checkable::Ptr& checkable)
-{
- return static_cast<int>(checkable->GetCheckInterval());
-}
-
int CompatUtility::GetCheckableNoMoreNotifications(const Checkable::Ptr& checkable)
{
if (CompatUtility::GetCheckableNotificationNotificationInterval(checkable) == 0 && !checkable->GetVolatile())
static double GetCheckableRetryInterval(const Checkable::Ptr& checkable);
static String GetCheckableCheckPeriod(const Checkable::Ptr& checkable);
- static int GetCheckableFreshnessChecksEnabled(const Checkable::Ptr& checkable);
- static int GetCheckableFreshnessThreshold(const Checkable::Ptr& checkable);
- static int GetCheckableIsAcknowledged(const Checkable::Ptr& checkable);
static int GetCheckableNoMoreNotifications(const Checkable::Ptr& checkable);
static int GetCheckableInCheckPeriod(const Checkable::Ptr& checkable);
static int GetCheckableInNotificationPeriod(const Checkable::Ptr& checkable);
table->AddColumn(prefix + "active_checks_enabled", Column(&ServicesTable::ActiveChecksEnabledAccessor, objectAccessor));
table->AddColumn(prefix + "check_options", Column(&Table::EmptyStringAccessor, objectAccessor));
table->AddColumn(prefix + "flap_detection_enabled", Column(&ServicesTable::FlapDetectionEnabledAccessor, objectAccessor));
- table->AddColumn(prefix + "check_freshness", Column(&ServicesTable::CheckFreshnessAccessor, objectAccessor));
+ table->AddColumn(prefix + "check_freshness", Column(&Table::OneAccessor, objectAccessor));
table->AddColumn(prefix + "obsess_over_service", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&Table::ZeroAccessor, objectAccessor));
return Convert::ToLong(service->GetEnableFlapping());
}
-Value ServicesTable::CheckFreshnessAccessor(const Value& row)
-{
- Service::Ptr service = static_cast<Service::Ptr>(row);
-
- if (!service)
- return Empty;
-
- return CompatUtility::GetCheckableFreshnessChecksEnabled(service);
-}
-
Value ServicesTable::StalenessAccessor(const Value& row)
{
Service::Ptr service = static_cast<Service::Ptr>(row);
static Value ProcessPerformanceDataAccessor(const Value& row);
static Value ActiveChecksEnabledAccessor(const Value& row);
static Value FlapDetectionEnabledAccessor(const Value& row);
- static Value CheckFreshnessAccessor(const Value& row);
static Value StalenessAccessor(const Value& row);
static Value CheckIntervalAccessor(const Value& row);
static Value RetryIntervalAccessor(const Value& row);