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