diff --git a/library/Icingadb/ProvidedHook/Reporting/EmailAddressBook.php b/library/Icingadb/ProvidedHook/Reporting/EmailAddressBook.php new file mode 100644 index 000000000..0cd33f61e --- /dev/null +++ b/library/Icingadb/ProvidedHook/Reporting/EmailAddressBook.php @@ -0,0 +1,28 @@ +getDb()) as $user) { + $emails[$user['email']] = $user['display_name']; + } + + return $emails; + } +} diff --git a/run.php b/run.php index eb9c71d9e..f594a9142 100644 --- a/run.php +++ b/run.php @@ -10,6 +10,7 @@ $this->provideHook('health', 'RedisHealth'); $this->provideHook('Reporting/Report', 'Reporting/HostSlaReport'); $this->provideHook('Reporting/Report', 'Reporting/ServiceSlaReport'); +$this->provideHook('Reporting/EmailAddressBook', 'Reporting/EmailAddressBook'); if (! $this::exists('monitoring')) { $modulePath = null;