These sensors should be reworked to not depend on dblog (carries a significant performance impact), or should handle the case of a non-existent watchdog table more gracefully (perhaps auto-disable?).

Failed nonexisting user logins

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site.watchdog' doesn't exist: SELECT watchdog.variables AS variables, COUNT(*) AS records_count FROM {watchdog} watchdog WHERE (type = :db_condition_placeholder_0) AND (message = :db_condition_placeholder_1) AND (timestamp > :db_condition_placeholder_2) GROUP BY variables ORDER BY records_count DESC; Array ( [:db_condition_placeholder_0] => user [:db_condition_placeholder_1] => Login attempt failed from %ip. [:db_condition_placeholder_2] => 1526924213 )

Failed user logins

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site.watchdog' doesn't exist: SELECT watchdog.variables AS variables, COUNT(*) AS records_count FROM {watchdog} watchdog WHERE (type = :db_condition_placeholder_0) AND (message = :db_condition_placeholder_1) AND (timestamp > :db_condition_placeholder_2) GROUP BY variables ORDER BY records_count DESC; Array ( [:db_condition_placeholder_0] => user [:db_condition_placeholder_1] => Login attempt failed for %user. [:db_condition_placeholder_2] => 1526923792 )

Successful user logins

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site.watchdog' doesn't exist: SELECT COUNT(*) AS records_count FROM {watchdog} watchdog WHERE (type = :db_condition_placeholder_0) AND (message = :db_condition_placeholder_1) AND (timestamp > :db_condition_placeholder_2); Array ( [:db_condition_placeholder_0] => user [:db_condition_placeholder_1] => Session opened for %name. [:db_condition_placeholder_2] => 1526923792 )

User session logouts

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site.watchdog' doesn't exist: SELECT COUNT(*) AS records_count FROM {watchdog} watchdog WHERE (type = :db_condition_placeholder_0) AND (message = :db_condition_placeholder_1) AND (timestamp > :db_condition_placeholder_2); Array ( [:db_condition_placeholder_0] => user [:db_condition_placeholder_1] => Session closed for %name. [:db_condition_placeholder_2] => 1526923792 )

Comments

nhoag created an issue. See original summary.

n8nl’s picture

Also noting that it's currently not possible to disable these monitors via the UI. Attempts fail with the following message:
The table watchdog does not exist in the database site

arpad.rozsa’s picture

Status: Active » Needs review
StatusFileSize
new3.28 KB

Updated the configurations to have a dependency on dblog module and moved them into the optional directory, so they won't be installed, if the dblog is not already installed.

@nhoag You could disable them through the UI, if you do it here /admin/config/system/monitoring/sensors, but yes if you edit one sensor you would get that error.

berdir’s picture

Status: Needs review » Needs work

We should also add provider = "dblog", to those sensor plugins, then they will not be available at all when the module isn't enabled.

arpad.rozsa’s picture

Status: Needs work » Needs review
StatusFileSize
new5.21 KB
new1.93 KB

Added the providers to the plugins.

  • Berdir committed 011161b on 8.x-1.x authored by arpad.rozsa
    Issue #2974583 by arpad.rozsa: Login and Logout sensors show as Critical...
berdir’s picture

Status: Needs review » Fixed

Thanks, looks good.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.