SingleStore DB

Audit Logging Configuration Variables

The configuration variables associated with audit logging are described in the following table.

Setting Name

Value

auditlog_level

Specifies the audit logging level. By default, this value is set to OFF. Ten other levels are available — see Audit Logging Levels for more information.

auditlog_disk_sync

Specifies whether every audit log record is synchronously written and persisted to the disk. By default, this value is set to OFF and audit log disk syncs are delayed.

auditlog_retention_period

Indicates the retention period (in days) for audit log files. Setting this to 0 (the default) means that log files will be kept on the server indefinitely.

auditlog_rotation_size

Specifies the maximum size per log file in bytes. By default, this value is set to 128MB, or 134217728 bytes.

auditlog_rotation_time

Specifies the maximum time duration to write to a single log file in seconds. The log rotation check happens when SingleStore DB writes audit entries to the log. Therefore, in some rare cases (and especially on leaf nodes) where there are not a lot of entries written to the log, it is possible that the log is not rotated for greater periods of time than configured in auditlog_rotation_time. By default, this value is set to 1 hour, or 3600 seconds.

auditlogsdir

Specifies the local or network directory to write log files. By default, this value is set to the auditlogs directory in your node’s SingleStore DB directory. For example: /var/lib/memsql/<node-type>-<port>/auditlogs

To enable audit logging, set auditlog_level to a value other than OFF. The other variables described in the table above have default values that can be overridden, if desired.