You are here

function nagios_check_modules in Nagios Monitoring 8

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

File

./nagios.module, line 783
Main file for Nagios service monitoring.

Code

function nagios_check_modules() {
  $config = Drupal::config('core.extension');
  $modules = $config
    ->get('module');
  $count = count($modules);
  $data = [
    'status' => NAGIOS_STATUS_OK,
    'type' => 'perf',
    'text' => $count,
  ];
  return [
    'key' => 'MOD',
    'data' => $data,
  ];
}