You are here

function ultimate_cron_nagios in Ultimate Cron 7

Same name and namespace in other branches
  1. 8.2 ultimate_cron.nagios.inc \ultimate_cron_nagios()
  2. 8 ultimate_cron.nagios.inc \ultimate_cron_nagios()
  3. 6 ultimate_cron.nagios.inc \ultimate_cron_nagios()

Implementation of hook_nagios().

File

./ultimate_cron.nagios.inc, line 15

Code

function ultimate_cron_nagios($check = 'nagios') {
  $status = array();
  foreach (ultimate_cron_nagios_functions() as $function => $description) {
    if (variable_get('ultimate_cron_nagios_func_' . $function, TRUE) && ($check == 'nagios' || $check == $function)) {
      $func = $function . '_check';
      $result = $func();
      $status[$result['key']] = $result['data'];
    }
  }
  return $status;
}