You are here

function nagios_check_themes in Nagios Monitoring 7

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

Report the number of enabled themes.

Return value

array

File

./nagios.module, line 1181

Code

function nagios_check_themes() {
  $count = (int) db_query("SELECT COUNT(*) FROM {system} WHERE status = :status AND type = :type", [
    ':status' => 1,
    ':type' => 'theme',
  ])
    ->fetchField();
  $data = [
    'status' => NAGIOS_STATUS_OK,
    'type' => 'perf',
    'text' => $count,
  ];
  return [
    'key' => 'THM',
    'data' => $data,
  ];
}