icingaweb2-module-graphite/run.php
Eric Lippmann 05d6f5890a License source files as GPL-3.0-or-later
Add SPDX license headers and mark source files as GPL-3.0-or-later to
preserve the option to relicense under later GPL versions.
2026-03-11 21:48:49 +01:00

32 lines
1.1 KiB
PHP

<?php
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later
/** @var \Icinga\Application\Modules\Module $this */
use Icinga\Module\Graphite\ProvidedHook\Icingadb\IcingadbSupport;
$this->provideHook('monitoring/DetailviewExtension');
$this->provideHook('icingadb/IcingadbSupport');
$this->provideHook('icingadb/HostDetailExtension');
$this->provideHook('icingadb/ServiceDetailExtension');
if (! $this->exists('icingadb') || ! IcingadbSupport::useIcingaDbAsBackend()) {
$this->addRoute('graphite/monitoring-graph/host', new Zend_Controller_Router_Route(
'graphite/graph/host',
[
'controller' => 'monitoring-graph',
'action' => 'host',
'module' => 'graphite'
]
));
$this->addRoute('graphite/monitoring-graph/service', new Zend_Controller_Router_Route(
'graphite/graph/service',
[
'controller' => 'monitoring-graph',
'action' => 'service',
'module' => 'graphite'
]
));
}