summaryrefslogtreecommitdiffstats
path: root/run.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:16 +0000
commit2e582fe0b8b6a8e67982ddb84935db1bd3b401fe (patch)
treedd511b321f308264952cffb005a4288ea4e478e6 /run.php
parentInitial commit. (diff)
downloadicingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.tar.xz
icingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.zip
Adding upstream version 1.2.2.upstream/1.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'run.php')
-rw-r--r--run.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/run.php b/run.php
new file mode 100644
index 0000000..6c69bc9
--- /dev/null
+++ b/run.php
@@ -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'
+ ]
+ ));
+}