2019-12-06 06:25:32 -05:00
|
|
|
<?php
|
|
|
|
|
|
2026-02-23 17:12:09 -05:00
|
|
|
// SPDX-FileCopyrightText: 2019 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2020-03-13 03:38:01 -04:00
|
|
|
|
2019-12-06 06:25:32 -05:00
|
|
|
/** @var $this \Icinga\Application\Modules\Module */
|
|
|
|
|
|
|
|
|
|
$this->provideHook('ApplicationState');
|
2021-05-03 09:14:38 -04:00
|
|
|
$this->provideHook('X509/Sni');
|
2021-04-20 08:57:57 -04:00
|
|
|
$this->provideHook('health', 'IcingaHealth');
|
2021-04-20 08:58:25 -04:00
|
|
|
$this->provideHook('health', 'RedisHealth');
|
2022-04-07 06:34:59 -04:00
|
|
|
$this->provideHook('Reporting/Report', 'Reporting/HostSlaReport');
|
2022-08-15 07:11:27 -04:00
|
|
|
$this->provideHook('Reporting/Report', 'Reporting/TotalHostSlaReport');
|
2022-04-07 06:35:38 -04:00
|
|
|
$this->provideHook('Reporting/Report', 'Reporting/ServiceSlaReport');
|
2022-08-15 07:11:27 -04:00
|
|
|
$this->provideHook('Reporting/Report', 'Reporting/TotalServiceSlaReport');
|
2021-08-20 05:07:51 -04:00
|
|
|
|
2025-10-24 05:37:50 -04:00
|
|
|
if ($this::exists('notifications')) {
|
|
|
|
|
$this->provideHook('Notifications/v1/Source');
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 09:38:32 -04:00
|
|
|
if ($this::exists('reporting')) {
|
2023-07-14 06:59:43 -04:00
|
|
|
$this->provideHook('Icingadb/HostActions', 'CreateHostSlaReport');
|
|
|
|
|
$this->provideHook('Icingadb/ServiceActions', 'CreateServiceSlaReport');
|
2023-07-14 06:30:26 -04:00
|
|
|
$this->provideHook('Icingadb/HostsDetailExtension', 'CreateHostsSlaReport');
|
|
|
|
|
$this->provideHook('Icingadb/ServicesDetailExtension', 'CreateServicesSlaReport');
|
2023-05-31 09:38:32 -04:00
|
|
|
}
|
|
|
|
|
|
2026-03-25 17:08:07 -04:00
|
|
|
if (! $this::exists('monitoring') && $this->app->getModuleManager()->hasInstalled('monitoring')) {
|
|
|
|
|
// For compatibility reasons, Icinga DB Web also supports hooks originally written for the monitoring module.
|
|
|
|
|
// This requires the monitoring module to be either enabled or installed.
|
|
|
|
|
// If it is only installed, its autoloader must be registered manually to resolve monitoring module hook classes.
|
|
|
|
|
$this->app->getModuleManager()->getModule('monitoring', assertLoaded: false)->registerAutoloader();
|
2021-08-20 05:07:51 -04:00
|
|
|
}
|