diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:18 +0000 |
commit | 23be945fd2810ee82e3a23cbcd2352c9bda43d4f (patch) | |
tree | dd511b321f308264952cffb005a4288ea4e478e6 /run.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-graphite-23be945fd2810ee82e3a23cbcd2352c9bda43d4f.tar.xz icingaweb2-module-graphite-23be945fd2810ee82e3a23cbcd2352c9bda43d4f.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'run.php')
-rw-r--r-- | run.php | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +<?php + +/** @var \Icinga\Application\Modules\Module $this */ + +use Icinga\Module\Graphite\ProvidedHook\Icingadb\IcingadbSupport; + +require_once $this->getLibDir() . '/vendor/Psr/Loader.php'; +require_once $this->getLibDir() . '/vendor/iplx/Loader.php'; + +$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' + ] + )); +} |