You are here

function nagios_requirements in Nagios Monitoring 6

Same name and namespace in other branches
  1. 7 nagios.install \nagios_requirements()

Implementation of hook_requirements().

File

./nagios.install, line 19

Code

function nagios_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {

    // Raise warning if Nagios Unique ID has not been set yet.
    if (variable_get('nagios_ua', '') == '') {
      $requirements['nagios'] = array(
        'title' => t('Nagios module'),
        'value' => t('Not configured'),
        'description' => t('Nagios module has not been configured yet. Please configure its settings from the <a href="@url">Nagios settings page</a>.', array(
          '@url' => url('admin/settings/nagios'),
        )),
        'severity' => REQUIREMENT_WARNING,
      );
    }
  }
  return $requirements;
}