icingadb-web/run.php

34 lines
1.5 KiB
PHP
Raw Normal View History

<?php
// SPDX-FileCopyrightText: 2019 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later
2020-03-13 03:38:01 -04:00
/** @var $this \Icinga\Application\Modules\Module */
$this->provideHook('ApplicationState');
$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');
$this->provideHook('Reporting/Report', 'Reporting/TotalHostSlaReport');
2022-04-07 06:35:38 -04:00
$this->provideHook('Reporting/Report', 'Reporting/ServiceSlaReport');
$this->provideHook('Reporting/Report', 'Reporting/TotalServiceSlaReport');
if ($this::exists('notifications')) {
$this->provideHook('Notifications/v1/Source');
}
if ($this::exists('reporting')) {
$this->provideHook('Icingadb/HostActions', 'CreateHostSlaReport');
$this->provideHook('Icingadb/ServiceActions', 'CreateServiceSlaReport');
$this->provideHook('Icingadb/HostsDetailExtension', 'CreateHostsSlaReport');
$this->provideHook('Icingadb/ServicesDetailExtension', 'CreateServicesSlaReport');
}
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();
}