Audit Logging Levels
On this page
There are 11 logging levels that can be specified by the auditlog_ variable in a node’s memsql.
-
Logging is disabled:
-
OFF
-
-
Log only valid statements and queries:
-
LOGINS-ONLY -
ADMIN-ONLY -
WRITES-ONLY -
ALL-QUERIES -
ALL-QUERIES-PLAINTEXT -
ALL-RESULTS
-
-
Log valid and invalid statements and queries:
-
ADMIN-ONLY-INCLUDING-PARSE-FAILS -
WRITES-ONLY-INCLUDING-PARSE-FAILS -
ALL-QUERIES-INCLUDING-PARSE-FAILS -
ALL-QUERIES-PLAINTEXT-INCLUDING-PARSE-FAILS -
ALL-RESULTS-INCLUDING-PARSE-FAILS
-
Note
To configure the audit logging level for each individual database user, refer to User-Specific Audit Logging Level.
A valid statement or query is one that can be successfully parsed by SingleStore.
Warning
User credentials and PII information contained in all valid statements and queries is obfuscated in audit logs.
Before selecting any level that specifies INCLUDING-PARSE-FAILS, ensure that the log file location is secured appropriately and that extra precaution is taken when processing the logs.
To configure the audit logging level for each individual database user, refer to User-Specific Audit Logging Level.
LOGINS-ONLY
The LOGINS-ONLY level logs the successful and failed login attempts into the database.LOGINS-ONLY level does not include the PARSE-FAILS option for logins, because this option is reserved for queries.LOGINS-ONLY level is the lowest level of the audit log, i.
ADMIN-ONLY and ADMIN-ONLY-INCLUDING-PARSE-FAILS
The ADMIN-ONLY level is inclusive of the LOGINS-ONLY level logs, and it also logs DDL operations such as CREATE, DROP, ALTER, etc.SET PASSWORD), the password’s value will be omitted from the log.
The ADMIN-ONLY-INCLUDING-PARSE-FAILS level is inclusive of ADMIN-ONLY but also logs invalid statements that fail to parse.
WRITES-ONLY and WRITES-ONLY-INCLUDING-PARSE-FAILS
The WRITES-ONLY level is inclusive of ADMIN-ONLY but also logs DML operations such as INSERT, DELETE, UPDATE, with one exception: SELECT queries are not logged.
The WRITES-ONLY-INCLUDING-PARSE-FAILS level is inclusive of WRITES-ONLY but also logs invalid statements that fail to parse.
ALL-QUERIES and ALL-QUERIES-INCLUDING-PARSE-FAILS
The ALL-QUERIES level is inclusive of WRITES-ONLY but also logs read operations such as SELECT statements.
The ALL-QUERIES-INCLUDING-PARSE-FAILS level is inclusive of ALL-QUERIES but also logs invalid statements that fail to parse.
ALL-QUERIES-PLAINTEXT and ALL-QUERIES-PLAINTEXT-INCLUDING-PARSE-FAILS
The ALL-QUERIES-PLAINTEXT level is inclusive of ALL-QUERIES but also logs the entire literal query, not just the parameterized version without literal strings and numbers.
The ALL-QUERIES-PLAINTEXT-INCLUDING-PARSE-FAILS level is inclusive of ALL-QUERIES-PLAINTEXT but also logs invalid statements that fail to parse.
ALL-RESULTS and ALL-RESULTS-INCLUDING-PARSE-FAILS
The ALL-RESULTS level is inclusive of ALL-QUERIES-PLAINTEXT but also logs the database’s responses.
When this level is selected, the entry ID for a query is shared with the results entries.
The ALL-RESULTS-INCLUDING-PARSE-FAILS level is inclusive of ALL-RESULTS but also logs invalid statements that fail to parse.
User-Specific Audit Logging Level
In addition to global cluster-level audit logging, SingleStore supports configuring the audit logging level for each individual database user.AUDITLOG_ clause in the CREATE USER or ALTER USER statement to specify a user-specific audit logging level.
-
For new users:
CREATE USER 'username'@'host' ...WITH AUDITLOG_LEVEL = '<audit_logging_level>'; -
For existing users:
ALTER USER 'username'@'host' ...SET AUDITLOG_LEVEL = '<audit_logging_level>';
Note
Changes to an existing user's audit logging level take effect when the user reconnects.
If a user-specific audit logging level is set to a non-NULL value, it overrides the global audit logging level; otherwise, the user inherits the current global audit logging level.OFF, audit logging is disabled for all the database users.
The following table shows how the effective audit logging level is determined for a database user from the user-specific and global audit logging configuration:
|
User-Specific Audit Logging Level |
Global Audit Logging Level |
Effective Audit Logging Level for the User |
|---|---|---|
|
Any level |
|
If the global audit logging level is |
|
|
Any level |
Audit logging is disabled for this user. |
|
|
Any non- |
The user inherits the current global audit logging level. |
|
Any non- |
Any non- |
User-specific audit logging level is applied and it overrides the global audit logging level. |
The AUDITLOG_ column in the USERS information schema view displays the configured audit logging level configured for a user.
Last modified: