function nagios_check_nodes in Nagios Monitoring 7
Same name and namespace in other branches
- 8 nagios.module \nagios_check_nodes()
- 5 nagios.module \nagios_check_nodes()
- 6 nagios.module \nagios_check_nodes()
Report the number of published nodes.
Return value
array
File
- ./
nagios.module, line 1098
Code
function nagios_check_nodes() {
// Include number of active nodes in the report
$count = (int) db_query("SELECT COUNT(*) FROM {node} WHERE status = :status", [
':status' => 1,
])
->fetchField();
$data = [
'status' => NAGIOS_STATUS_OK,
'type' => 'perf',
'text' => $count,
];
return [
'key' => 'NOD',
'data' => $data,
];
}