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
Comment #2
n8nl commentedAlso 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 siteComment #3
arpad.rozsa commentedUpdated 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.Comment #4
berdirWe should also add provider = "dblog", to those sensor plugins, then they will not be available at all when the module isn't enabled.
Comment #5
arpad.rozsa commentedAdded the providers to the plugins.
Comment #7
berdirThanks, looks good.