You are here

public function SensorUserFailedLogins::buildQuery in Monitoring 7

Builds the database query.

Return value

\SelectQuery

Overrides SensorDatabaseAggregator::buildQuery

File

lib/Drupal/monitoring/Sensor/Sensors/SensorUserFailedLogins.php, line 21
Contains \Drupal\monitoring\Sensor\Sensors\SensorUserFailedLogins.

Class

SensorUserFailedLogins
Monitors user failed login from dblog messages.

Namespace

Drupal\monitoring\Sensor\Sensors

Code

public function buildQuery() {
  $query = parent::buildQuery();
  $query
    ->addField('watchdog', 'variables');
  $query
    ->groupBy('watchdog.variables');
  return $query;
}