You are here

function nagios_check_modules in Nagios Monitoring 6

Same name and namespace in other branches
  1. 8 nagios.module \nagios_check_modules()
  2. 5 nagios.module \nagios_check_modules()
  3. 7 nagios.module \nagios_check_modules()

Report the number of enabled modules.

Return value

Array

File

./nagios.module, line 783

Code

function nagios_check_modules() {
  $count = (int) db_result(db_query("SELECT COUNT(*) FROM {system} WHERE status = 1 AND type = 'module'"));
  $data = array(
    'status' => NAGIOS_STATUS_OK,
    'type' => 'perf',
    'text' => $count,
  );
  return array(
    'key' => 'MOD',
    'data' => $data,
  );
}