function monitoring_icinga_config_active_page in Monitoring 7
Icinga config active page callback.
1 string reference to 'monitoring_icinga_config_active_page'
- monitoring_icinga_menu in modules/
monitoring_icinga/ monitoring_icinga.module - Implements hook_menu().
File
- modules/
monitoring_icinga/ monitoring_icinga.admin.inc, line 54 - Monitoring Icinga admin pages.
Code
function monitoring_icinga_config_active_page() {
$output = array();
$output[] = array(
'#theme' => 'monitoring_config_box',
'#description' => t('Active services check means Icinga server itself is responsible for contacting host to retrieve status data. Info on this page will help you to configure this setup.'),
);
$output[] = array(
'#theme' => 'monitoring_config_box',
'#title' => t('Prerequisites'),
'#description' => t('Before continuing with following setup you need to have Icinga server up and running and the NRPE connector at the monitored system. Refer to the README.txt for a brief setup procedure.'),
);
$output[] = array(
'#theme' => 'monitoring_config_box',
'#title' => t('Command definition to issue the remote NRPE call'),
'#description' => t('In the /etc/icinga/commands.cfg file add following command definition.'),
'#code' => monitoring_config_code('monitoring_icinga', 'command'),
'#code_height' => '70',
);
$output[] = monitoring_icinga_objects_definitions_output();
$conf_path = explode('/', conf_path());
$output[] = array(
'#theme' => 'monitoring_config_box',
'#title' => t('NRPE configuration'),
'#description' => t('After installing NRPE on the monitored machine in the /etc/nagios/nrpe_local.cfg add following code.'),
'#code' => monitoring_config_code('monitoring_icinga', 'nrpe_local', array(
'@root' => DRUPAL_ROOT,
'@uri' => array_pop($conf_path),
'@site_key' => monitoring_host_key(),
'@ip' => $_SERVER['SERVER_ADDR'],
)),
'#code_height' => '300',
);
return $output;
}