diff --git a/components/livestatus/commentstable.cpp b/components/livestatus/commentstable.cpp index ec289ff04..6383107f6 100644 --- a/components/livestatus/commentstable.cpp +++ b/components/livestatus/commentstable.cpp @@ -85,7 +85,7 @@ Value CommentsTable::AuthorAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return comment->Get("author"); } @@ -95,7 +95,7 @@ Value CommentsTable::CommentAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return comment->Get("text"); } @@ -105,7 +105,7 @@ Value CommentsTable::IdAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return comment->Get("legacy_id"); } @@ -115,7 +115,7 @@ Value CommentsTable::EntryTimeAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return static_cast(comment->Get("entry_time")); } @@ -125,7 +125,7 @@ Value CommentsTable::TypeAccessor(const Value& row) Service::Ptr svc = Service::GetOwnerByCommentID(row); if (!svc) - return Value(); + return Empty; return (svc->IsHostCheck() ? 1 : 2); } @@ -135,7 +135,7 @@ Value CommentsTable::IsServiceAccessor(const Value& row) Service::Ptr svc = Service::GetOwnerByCommentID(row); if (!svc) - return Value(); + return Empty; return (svc->IsHostCheck() ? 0 : 1); } @@ -157,7 +157,7 @@ Value CommentsTable::EntryTypeAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return comment->Get("entry_type"); } @@ -167,7 +167,7 @@ Value CommentsTable::ExpiresAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return comment->Get("expires"); } @@ -177,7 +177,7 @@ Value CommentsTable::ExpireTimeAccessor(const Value& row) Dictionary::Ptr comment = Service::GetCommentByID(row); if (!comment) - return Value(); + return Empty; return static_cast(comment->Get("expire_time")); } diff --git a/components/livestatus/contactstable.cpp b/components/livestatus/contactstable.cpp index 4900e682a..e518be332 100644 --- a/components/livestatus/contactstable.cpp +++ b/components/livestatus/contactstable.cpp @@ -78,7 +78,7 @@ Value ContactsTable::EmailAccessor(const Value& row) Dictionary::Ptr macros = static_cast(row)->GetMacros(); if (!macros) - return Value(); + return Empty; return macros->Get("email"); } @@ -88,7 +88,7 @@ Value ContactsTable::PagerAccessor(const Value& row) Dictionary::Ptr macros = static_cast(row)->GetMacros(); if (!macros) - return Value(); + return Empty; return macros->Get("pager"); } @@ -96,13 +96,13 @@ Value ContactsTable::PagerAccessor(const Value& row) Value ContactsTable::HostNotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::ServiceNotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::CanSubmitCommandsAccessor(const Value& row) @@ -114,53 +114,53 @@ Value ContactsTable::CanSubmitCommandsAccessor(const Value& row) Value ContactsTable::HostNotificationsEnabledAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::ServiceNotificationsEnabledAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::InHostNotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::InServiceNotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::CustomVariableNamesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::CustomVariableValuesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::CustomVariablesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ContactsTable::ModifiedAttributesAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ContactsTable::ModifiedAttributesListAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp index 5504a246d..ef0ecc59d 100644 --- a/components/livestatus/hoststable.cpp +++ b/components/livestatus/hoststable.cpp @@ -178,7 +178,7 @@ Value HostsTable::AddressAccessor(const Value& row) Dictionary::Ptr macros = static_cast(row)->GetMacros(); if (!macros) - return Value(); + return Empty; return macros->Get("address"); } @@ -188,7 +188,7 @@ Value HostsTable::Address6Accessor(const Value& row) Dictionary::Ptr macros = static_cast(row)->GetMacros(); if (!macros) - return Value(); + return Empty; return macros->Get("address6"); } @@ -199,13 +199,13 @@ Value HostsTable::CheckCommandAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; CheckCommand::Ptr checkcommand = hc->GetCheckCommand(); if (checkcommand) return checkcommand->GetName(); /* this is the name without '!' args */ - return Value(); + return Empty; } Value HostsTable::CheckCommandExpandedAccessor(const Value& row) @@ -214,13 +214,13 @@ Value HostsTable::CheckCommandExpandedAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; CheckCommand::Ptr checkcommand = hc->GetCheckCommand(); if (checkcommand) return checkcommand->GetName(); /* this is the name without '!' args */ - return Value(); + return Empty; } Value HostsTable::EventHandlerAccessor(const Value& row) @@ -229,13 +229,13 @@ Value HostsTable::EventHandlerAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; EventCommand::Ptr eventcommand = hc->GetEventCommand(); if (eventcommand) return eventcommand->GetName(); - return Value(); + return Empty; } Value HostsTable::NotificationPeriodAccessor(const Value& row) @@ -244,10 +244,10 @@ Value HostsTable::NotificationPeriodAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; /* TODO hc->GetNotifications->(loop)->GetNotificationPeriod() */ - return Value(); + return Empty; } Value HostsTable::CheckPeriodAccessor(const Value& row) @@ -256,12 +256,12 @@ Value HostsTable::CheckPeriodAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; TimePeriod::Ptr timeperiod = hc->GetCheckPeriod(); if (!timeperiod) - return Value(); + return Empty; return timeperiod->GetName(); } @@ -271,7 +271,7 @@ Value HostsTable::NotesAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("notes"); } @@ -279,7 +279,7 @@ Value HostsTable::NotesAccessor(const Value& row) Value HostsTable::NotesExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NotesUrlAccessor(const Value& row) @@ -287,7 +287,7 @@ Value HostsTable::NotesUrlAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("notes_url"); } @@ -295,7 +295,7 @@ Value HostsTable::NotesUrlAccessor(const Value& row) Value HostsTable::NotesUrlExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::ActionUrlAccessor(const Value& row) @@ -303,7 +303,7 @@ Value HostsTable::ActionUrlAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("action_url"); } @@ -311,7 +311,7 @@ Value HostsTable::ActionUrlAccessor(const Value& row) Value HostsTable::ActionUrlExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::PluginOutputAccessor(const Value& row) @@ -343,7 +343,7 @@ Value HostsTable::IconImageAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("icon_image"); } @@ -351,7 +351,7 @@ Value HostsTable::IconImageAccessor(const Value& row) Value HostsTable::IconImageExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::IconImageAltAccessor(const Value& row) @@ -359,7 +359,7 @@ Value HostsTable::IconImageAltAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("icon_image_alt"); } @@ -369,7 +369,7 @@ Value HostsTable::StatusmapImageAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("statusmap_image"); } @@ -389,7 +389,7 @@ Value HostsTable::LongPluginOutputAccessor(const Value& row) Value HostsTable::InitialStateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::MaxCheckAttemptsAccessor(const Value& row) @@ -398,7 +398,7 @@ Value HostsTable::MaxCheckAttemptsAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return hc->GetMaxCheckAttempts(); } @@ -409,7 +409,7 @@ Value HostsTable::FlapDetectionEnabledAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetEnableFlapping() ? 1 : 0); } @@ -417,7 +417,7 @@ Value HostsTable::FlapDetectionEnabledAccessor(const Value& row) Value HostsTable::CheckFreshnessAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::ProcessPerformanceDataAccessor(const Value& row) @@ -432,7 +432,7 @@ Value HostsTable::AcceptPassiveChecksAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetEnablePassiveChecks() ? 1 : 0); } @@ -449,7 +449,7 @@ Value HostsTable::AcknowledgementTypeAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; /* important: lock acknowledgements */ ObjectLock olock(hc); @@ -463,7 +463,7 @@ Value HostsTable::CheckTypeAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetEnableActiveChecks() ? 0 : 1); } @@ -484,7 +484,7 @@ Value HostsTable::CurrentAttemptAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return hc->GetCurrentCheckAttempt(); } @@ -492,13 +492,13 @@ Value HostsTable::CurrentAttemptAccessor(const Value& row) Value HostsTable::LastNotificationAccessor(const Value& row) { /* TODO Host->Service->GetNotifications->(loop)->GetLastNotification() */ - return Value(); + return Empty; } Value HostsTable::NextNotificationAccessor(const Value& row) { /* TODO Host->Service->GetNotifications->(loop)->GetNextNotification() */ - return Value(); + return Empty; } Value HostsTable::NextCheckAccessor(const Value& row) @@ -507,7 +507,7 @@ Value HostsTable::NextCheckAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return static_cast(hc->GetNextCheck()); } @@ -518,7 +518,7 @@ Value HostsTable::LastHardStateChangeAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return static_cast(hc->GetLastHardStateChange()); } @@ -529,7 +529,7 @@ Value HostsTable::HasBeenCheckedAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->HasBeenChecked() ? 1 : 0); } @@ -537,13 +537,13 @@ Value HostsTable::HasBeenCheckedAccessor(const Value& row) Value HostsTable::CurrentNotificationNumberAccessor(const Value& row) { /* TODO Host->Service->GetNotifications->(loop) new attribute */ - return Value(); + return Empty; } Value HostsTable::PendingFlexDowntimeAccessor(const Value& row) { /* TODO Host->Service->GetDowntimes->(loop) type flexible? */ - return Value(); + return Empty; } Value HostsTable::TotalServicesAccessor(const Value& row) @@ -557,7 +557,7 @@ Value HostsTable::ChecksEnabledAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetEnableActiveChecks() ? 1 : 0); } @@ -568,7 +568,7 @@ Value HostsTable::NotificationsEnabledAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetEnableNotifications() ? 1 : 0); } @@ -579,7 +579,7 @@ Value HostsTable::AcknowledgedAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; /* important: lock acknowledgements */ ObjectLock olock(hc); @@ -615,7 +615,7 @@ Value HostsTable::LastCheckAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return static_cast(hc->GetLastCheck()); } @@ -628,19 +628,19 @@ Value HostsTable::LastStateChangeAccessor(const Value& row) Value HostsTable::LastTimeUpAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::LastTimeDownAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::LastTimeUnreachableAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::IsFlappingAccessor(const Value& row) @@ -649,7 +649,7 @@ Value HostsTable::IsFlappingAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return hc->IsFlapping(); } @@ -660,7 +660,7 @@ Value HostsTable::ScheduledDowntimeDepthAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return hc->GetDowntimeDepth(); } @@ -668,7 +668,7 @@ Value HostsTable::ScheduledDowntimeDepthAccessor(const Value& row) Value HostsTable::IsExecutingAccessor(const Value& row) { /* TODO does that make sense with Icinga2? */ - return Value(); + return Empty; } Value HostsTable::ActiveChecksEnabledAccessor(const Value& row) @@ -678,7 +678,7 @@ Value HostsTable::ActiveChecksEnabledAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetEnableActiveChecks() ? 1 : 0); } @@ -686,25 +686,25 @@ Value HostsTable::ActiveChecksEnabledAccessor(const Value& row) Value HostsTable::CheckOptionsAccessor(const Value& row) { /* TODO - forcexec, freshness, orphan, none */ - return Value(); + return Empty; } Value HostsTable::ObsessOverHostAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value HostsTable::ModifiedAttributesAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value HostsTable::ModifiedAttributesListAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value HostsTable::CheckIntervalAccessor(const Value& row) @@ -713,7 +713,7 @@ Value HostsTable::CheckIntervalAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetCheckInterval() / 60.0); } @@ -724,7 +724,7 @@ Value HostsTable::RetryIntervalAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (hc->GetRetryInterval() / 60.0); } @@ -732,55 +732,55 @@ Value HostsTable::RetryIntervalAccessor(const Value& row) Value HostsTable::NotificationIntervalAccessor(const Value& row) { /* TODO Host->Services->GetNotifications->(loop)->GetNotificationInterval() */ - return Value(); + return Empty; } Value HostsTable::FirstNotificationDelayAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value HostsTable::LowFlapThresholdAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::HighFlapThresholdAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::X3dAccessor(const Value& row) { /* not supported - removed in Icinga 1.x */ - return Value(); + return Empty; } Value HostsTable::Y3dAccessor(const Value& row) { /* not supported - removed in Icinga 1.x */ - return Value(); + return Empty; } Value HostsTable::Z3dAccessor(const Value& row) { /* not supported - removed in Icinga 1.x */ - return Value(); + return Empty; } Value HostsTable::X2dAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::Y2dAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::LatencyAccessor(const Value& row) @@ -789,7 +789,7 @@ Value HostsTable::LatencyAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (Service::CalculateLatency(hc->GetLastCheckResult())); } @@ -800,7 +800,7 @@ Value HostsTable::ExecutionTimeAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return (Service::CalculateExecutionTime(hc->GetLastCheckResult())); } @@ -811,7 +811,7 @@ Value HostsTable::PercentStateChangeAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return hc->GetFlappingCurrent(); } @@ -819,13 +819,13 @@ Value HostsTable::PercentStateChangeAccessor(const Value& row) Value HostsTable::InNotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::InCheckPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::ContactsAccessor(const Value& row) @@ -835,7 +835,7 @@ Value HostsTable::ContactsAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; std::set allUsers; std::set users; @@ -854,72 +854,72 @@ Value HostsTable::ContactsAccessor(const Value& row) } - return Value(); + return Empty; } Value HostsTable::DowntimesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::DowntimesWithInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::CommentsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::CommentsWithInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::CommentsWithExtraInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::CustomVariableNamesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::CustomVariableValuesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::CustomVariablesAccessor(const Value& row) { /* TODO Dictionary */ - return Value(); + return Empty; } Value HostsTable::FilenameAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::ParentsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::ChildsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesAccessor(const Value& row) @@ -931,67 +931,67 @@ Value HostsTable::NumServicesAccessor(const Value& row) Value HostsTable::WorstServiceStateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesOkAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesWarnAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesCritAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesUnknownAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesPendingAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::WorstServiceHardStateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesHardOkAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesHardWarnAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesHardCritAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::NumServicesHardUnknownAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::HardStateAccessor(const Value& row) @@ -1000,7 +1000,7 @@ Value HostsTable::HardStateAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; if (hc->GetState() == StateOK) return StateOK; @@ -1013,13 +1013,13 @@ Value HostsTable::HardStateAccessor(const Value& row) Value HostsTable::PnpgraphPresentAccessor(const Value& row) { /* wtf. not supported */ - return Value(); + return Empty; } Value HostsTable::StalenessAccessor(const Value& row) { /* TODO time since last check normalized on the check_interval */ - return Value(); + return Empty; } Value HostsTable::GroupsAccessor(const Value& row) @@ -1029,7 +1029,7 @@ Value HostsTable::GroupsAccessor(const Value& row) Service::Ptr hc = static_cast(row)->GetHostCheckService(); if (!hc) - return Value(); + return Empty; return hc->GetGroups(); } @@ -1037,25 +1037,25 @@ Value HostsTable::GroupsAccessor(const Value& row) Value HostsTable::ContactGroupsAccessor(const Value& row) { /* TODO create array */ - return Value(); + return Empty; } Value HostsTable::ServicesAccessor(const Value& row) { /* TODO create array */ - return Value(); + return Empty; } /* dictionary */ Value HostsTable::ServicesWithStateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value HostsTable::ServicesWithInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } diff --git a/components/livestatus/logtable.cpp b/components/livestatus/logtable.cpp index a4f78895c..190c398ec 100644 --- a/components/livestatus/logtable.cpp +++ b/components/livestatus/logtable.cpp @@ -68,89 +68,89 @@ void LogTable::FetchRows(const AddRowFunction& addRowFn) Value LogTable::TimeAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::LinenoAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::ClassAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::MessageAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::TypeAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::OptionsAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::CommentAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::PluginOutputAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::StateAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::StateTypeAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::AttemptAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::ServiceDescriptionAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::HostNameAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::ContactNameAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value LogTable::CommandNameAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp index 1f506a477..3c690e727 100644 --- a/components/livestatus/servicestable.cpp +++ b/components/livestatus/servicestable.cpp @@ -163,7 +163,7 @@ Value ServicesTable::CheckCommandAccessor(const Value& row) if (checkcommand) return checkcommand->GetName(); /* this is the name without '!' args */ - return Value(); + return Empty; } Value ServicesTable::CheckCommandExpandedAccessor(const Value& row) @@ -173,7 +173,7 @@ Value ServicesTable::CheckCommandExpandedAccessor(const Value& row) if (checkcommand) return checkcommand->GetName(); /* this is the name without '!' args */ - return Value(); + return Empty; } Value ServicesTable::EventHandlerAccessor(const Value& row) @@ -183,7 +183,7 @@ Value ServicesTable::EventHandlerAccessor(const Value& row) if (eventcommand) return eventcommand->GetName(); - return Value(); + return Empty; } Value ServicesTable::PluginOutputAccessor(const Value& row) @@ -204,7 +204,7 @@ Value ServicesTable::PerfDataAccessor(const Value& row) Value ServicesTable::NotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CheckPeriodAccessor(const Value& row) @@ -212,7 +212,7 @@ Value ServicesTable::CheckPeriodAccessor(const Value& row) TimePeriod::Ptr timeperiod = static_cast(row)->GetCheckPeriod(); if (!timeperiod) - return Value(); + return Empty; return timeperiod->GetName(); } @@ -222,7 +222,7 @@ Value ServicesTable::NotesAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("notes"); } @@ -230,7 +230,7 @@ Value ServicesTable::NotesAccessor(const Value& row) Value ServicesTable::NotesExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::NotesUrlAccessor(const Value& row) @@ -238,7 +238,7 @@ Value ServicesTable::NotesUrlAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("notes_url"); } @@ -246,7 +246,7 @@ Value ServicesTable::NotesUrlAccessor(const Value& row) Value ServicesTable::NotesUrlExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::ActionUrlAccessor(const Value& row) @@ -254,7 +254,7 @@ Value ServicesTable::ActionUrlAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("action_url"); } @@ -262,7 +262,7 @@ Value ServicesTable::ActionUrlAccessor(const Value& row) Value ServicesTable::ActionUrlExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::IconImageAccessor(const Value& row) @@ -270,7 +270,7 @@ Value ServicesTable::IconImageAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("icon_image"); } @@ -278,7 +278,7 @@ Value ServicesTable::IconImageAccessor(const Value& row) Value ServicesTable::IconImageExpandedAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::IconImageAltAccessor(const Value& row) @@ -286,7 +286,7 @@ Value ServicesTable::IconImageAltAccessor(const Value& row) Dictionary::Ptr custom = static_cast(row)->GetCustom(); if (!custom) - return Value(); + return Empty; return custom->Get("icon_image_alt"); } @@ -294,7 +294,7 @@ Value ServicesTable::IconImageAltAccessor(const Value& row) Value ServicesTable::InitialStateAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ServicesTable::MaxCheckAttemptsAccessor(const Value& row) @@ -360,31 +360,31 @@ Value ServicesTable::AcknowledgementTypeAccessor(const Value& row) Value ServicesTable::NoMoreNotificationsAccessor(const Value& row) { /* TODO: notification_interval == 0, volatile == false */ - return Value(); + return Empty; } Value ServicesTable::LastTimeOkAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::LastTimeWarningAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::LastTimeCriticalAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::LastTimeUnknownAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::LastCheckAccessor(const Value& row) @@ -400,19 +400,19 @@ Value ServicesTable::NextCheckAccessor(const Value& row) Value ServicesTable::LastNotificationAccessor(const Value& row) { /* TODO Host->Service->GetNotifications->(loop)->GetLastNotification() */ - return Value(); + return Empty; } Value ServicesTable::NextNotificationAccessor(const Value& row) { /* TODO Host->Service->GetNotifications->(loop)->GetLastNotification() */ - return Value(); + return Empty; } Value ServicesTable::CurrentNotificationNumberAccessor(const Value& row) { /* TODO Host->Service->GetNotifications->(loop) new attribute */ - return Value(); + return Empty; } Value ServicesTable::LastStateChangeAccessor(const Value& row) @@ -465,7 +465,7 @@ Value ServicesTable::ProcessPerformanceDataAccessor(const Value& row) Value ServicesTable::IsExecutingAccessor(const Value& row) { /* TODO does that make sense with Icinga2? */ - return Value(); + return Empty; } Value ServicesTable::ActiveChecksEnabledAccessor(const Value& row) @@ -476,7 +476,7 @@ Value ServicesTable::ActiveChecksEnabledAccessor(const Value& row) Value ServicesTable::CheckOptionsAccessor(const Value& row) { /* TODO - forcexec, freshness, orphan, none */ - return Value(); + return Empty; } Value ServicesTable::FlapDetectionEnabledAccessor(const Value& row) @@ -487,31 +487,31 @@ Value ServicesTable::FlapDetectionEnabledAccessor(const Value& row) Value ServicesTable::CheckFreshnessAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::ObsessOverServiceAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ServicesTable::ModifiedAttributesAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ServicesTable::ModifiedAttributesListAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ServicesTable::PnpgraphPresentAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ServicesTable::CheckIntervalAccessor(const Value& row) @@ -527,25 +527,25 @@ Value ServicesTable::RetryIntervalAccessor(const Value& row) Value ServicesTable::NotificationIntervalAccessor(const Value& row) { /* TODO Host->Services->GetNotifications->(loop)->GetNotificationInterval() */ - return Value(); + return Empty; } Value ServicesTable::FirstNotificationDelayAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value ServicesTable::LowFlapThresholdAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::HighFlapThresholdAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::LatencyAccessor(const Value& row) @@ -566,13 +566,13 @@ Value ServicesTable::PercentStateChangeAccessor(const Value& row) Value ServicesTable::InCheckPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::InNotificationPeriodAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::ContactsAccessor(const Value& row) @@ -595,49 +595,49 @@ Value ServicesTable::ContactsAccessor(const Value& row) } } */ - return Value(); + return Empty; } Value ServicesTable::DowntimesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::DowntimesWithInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CommentsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CommentsWithInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CommentsWithExtraInfoAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CustomVariableNamesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CustomVariableValuesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::CustomVariablesAccessor(const Value& row) @@ -648,7 +648,7 @@ Value ServicesTable::CustomVariablesAccessor(const Value& row) Dictionary::Ptr custom = svc->Get("custom"); if (!custom) - return Value(); + return Empty; Dictionary::Ptr customvars = custom->ShallowClone(); customvars->Remove("notes"); @@ -662,19 +662,19 @@ Value ServicesTable::CustomVariablesAccessor(const Value& row) return customvars; */ /* TODO */ - return Value(); + return Empty; } Value ServicesTable::GroupsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value ServicesTable::ContactGroupsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } diff --git a/components/livestatus/statustable.cpp b/components/livestatus/statustable.cpp index 65e6dd1e6..e396ad2c7 100644 --- a/components/livestatus/statustable.cpp +++ b/components/livestatus/statustable.cpp @@ -110,121 +110,121 @@ void StatusTable::FetchRows(const AddRowFunction& addRowFn) Value StatusTable::NebCallbacksAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value StatusTable::NebCallbacksRateAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value StatusTable::RequestsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::RequestsRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ConnectionsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ConnectionsRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ServiceChecksAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ServiceChecksRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::HostChecksAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::HostChecksRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ForksAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ForksRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LogMessagesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LogMessagesRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ExternalCommandsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ExternalCommandsRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivechecksAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivechecksRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivecheckOverflowsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivecheckOverflowsRateAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::NagiosPidAccessor(const Value& row) @@ -271,25 +271,25 @@ Value StatusTable::EnableEventHandlersAccessor(const Value& row) Value StatusTable::ObsessOverServicesAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value StatusTable::ObsessOverHostsAccessor(const Value& row) { /* not supported */ - return Value(); + return Empty; } Value StatusTable::CheckServiceFreshnessAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::CheckHostFreshnessAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::EnableFlapDetectionAccessor(const Value& row) @@ -318,13 +318,13 @@ Value StatusTable::ProgramStartAccessor(const Value& row) Value StatusTable::LastCommandCheckAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LastLogRotationAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::IntervalLengthAccessor(const Value& row) @@ -336,13 +336,13 @@ Value StatusTable::IntervalLengthAccessor(const Value& row) Value StatusTable::NumHostsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::NumServicesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ProgramVersionAccessor(const Value& row) @@ -353,47 +353,47 @@ Value StatusTable::ProgramVersionAccessor(const Value& row) Value StatusTable::ExternalCommandBufferSlotsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ExternalCommandBufferUsageAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::ExternalCommandBufferMaxAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::CachedLogMessagesAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivestatusVersionAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivestatusActiveConnectionsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivestatusQueuedConnectionsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; } Value StatusTable::LivestatusThreadsAccessor(const Value& row) { /* TODO */ - return Value(); + return Empty; }