nagios_hook_test_module.module in Nagios Monitoring 8
File
tests/modules/nagios_hook_test_module/nagios_hook_test_module.module
View source
<?php
use Drupal\Core\Url;
function nagios_hook_test_module_nagios_info() {
return [
'name' => 'nagios_hook_test_module',
'id' => 'NAGIOS_CHECK_KEY',
];
}
function nagios_hook_test_module_nagios() {
return [
'NAGIOS_CHECK_KEY' => [
'status' => 1,
'type' => 'state',
'text' => 'Text description for the problem',
],
];
}
function nagios_hook_test_module_requirements() {
$url = Url::fromRoute('nagios.ignored_modules');
$url
->setAbsolute();
return [
'big_example_problem' => [
'title' => 'Nagios Hook Test Module',
'value' => 'This is an example error.',
'severity' => REQUIREMENT_ERROR,
'description' => 'This hook exists to play with IgnoredModulesForm at ' . $url
->toString(),
],
];
}