You are here

function nagios_check_nodes in Nagios Monitoring 6

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

Report the number of published nodes.

Return value

Array

File

./nagios.module, line 743

Code

function nagios_check_nodes() {

  // Include number of active nodes in the report
  $count = (int) db_result(db_query("SELECT COUNT(*) FROM {node} WHERE status = 1"));
  $data = array(
    'status' => NAGIOS_STATUS_OK,
    'type' => 'perf',
    'text' => $count,
  );
  return array(
    'key' => 'NOD',
    'data' => $data,
  );
}