You are here

function health_get_data in Health Status 7

Gets all the health status data from modules that hook into it.

Return value

array Results from all the health monitors.

4 calls to health_get_data()
health_admin_dashboard_form in ./health.admin.inc
Health dashboard with data from previous days.
health_api_get_data in ./health.service.inc
Gets data that can be used to display in the API.
health_cron_email_send in ./health.module
Sends a health status on cron run when necessary.
health_email_send in ./health.module
Determines if the Health status e-mail should be sent.

File

./health.module, line 168
Contains the basic hooks and function used by the Health system.

Code

function health_get_data() {
  $monitors = health_get_monitors();
  foreach ($monitors as $group => $checks) {

    // Run hooks for the name of the monitor.
    foreach ($checks as $key => $check) {
      $results[$group][$key] = module_invoke_all('health_monitor_' . $key, $check['args']);
    }
  }
  drupal_alter('health_data', $results);
  return (array) $results;
}