| 73 | REGISTER_STATSFUNCTION(IcingaApplication, &IcingaApplication::StatsFunc); |
| 74 | |
| 75 | void IcingaApplication::StatsFunc(const Dictionary::Ptr& status, [[maybe_unused]] const Array::Ptr& perfdata) |
| 76 | { |
| 77 | DictionaryData nodes; |
| 78 | |
| 79 | for (const IcingaApplication::Ptr& icingaapplication : ConfigType::GetObjectsByType<IcingaApplication>()) { |
| 80 | nodes.emplace_back(icingaapplication->GetName(), new Dictionary({ |
| 81 | { "node_name", icingaapplication->GetNodeName() }, |
| 82 | { "enable_notifications", icingaapplication->GetEnableNotifications() }, |
| 83 | { "enable_event_handlers", icingaapplication->GetEnableEventHandlers() }, |
| 84 | { "enable_flapping", icingaapplication->GetEnableFlapping() }, |
| 85 | { "enable_host_checks", icingaapplication->GetEnableHostChecks() }, |
| 86 | { "enable_service_checks", icingaapplication->GetEnableServiceChecks() }, |
| 87 | { "enable_perfdata", icingaapplication->GetEnablePerfdata() }, |
| 88 | { "environment", icingaapplication->GetEnvironment() }, |
| 89 | { "pid", Utility::GetPid() }, |
| 90 | { "program_start", Application::GetStartTime() }, |
| 91 | { "version", Application::GetAppVersion() } |
| 92 | })); |
| 93 | } |
| 94 | |
| 95 | status->Set("icingaapplication", new Dictionary(std::move(nodes))); |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * The entry point for the Icinga application. |
nothing calls this directly
no test coverage detected