You are here

function drush_nagios_list in Nagios Monitoring 7

Same name and namespace in other branches
  1. 8 nagios.drush.inc \drush_nagios_list()
  2. 6 nagios.drush.inc \drush_nagios_list()

Drush command callback: nagios-list.

File

./nagios.drush.inc, line 35
Provides drush integration for the Nagios module.

Code

function drush_nagios_list() {

  // Invoke hook_nagios_checks() here so people can add in their own checks.
  $commands = array_merge(module_invoke_all('nagios_checks'), drush_command_invoke_all('nagios_checks'));
  $rows = [];
  foreach ($commands as $cmd => $desc) {
    $rows[] = [
      $cmd,
      $desc,
    ];
  }
  return drush_print_table($rows);
}