You are here

function nagios_check_session_anon in Nagios Monitoring 8

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

Report the number of anonymous sessions.

Return value

array

File

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

Code

function nagios_check_session_anon() {
  $interval = Drupal::time()
    ->getRequestTime() - 900;

  // Last 15 minutes
  $count = nagios_session_count($interval, TRUE);
  $data = [
    'status' => NAGIOS_STATUS_OK,
    'type' => 'perf',
    'text' => $count,
  ];
  return [
    'key' => 'SAN',
    'data' => $data,
  ];
}