User Logging for MariaDB Xpand
This page is part of MariaDB's Documentation.
The parent of this page is: Logs
Topics on this page:
Overview
Xpand can track simple user activity on your cluster. User logging consists of timestamped logins and logouts and does not include detailed query activity.
By default, this log data is stored in user.log in the /data/clustrix/log/
directory.
Each Xpand Node will record access information each time a user logs in or out. There is a log file on each node and you can use the logdump command of The clx command-line administration tool to consolidate these logs and perform analysis.
Enabling User Logging
User logging is controlled by the global variable session_log_users
and is disabled by default. This variable is not available by session.
Name | Description | Default Value |
---|---|---|
| Log users and |
|
To activate user logging, run the following SQL statement:
SET GLOBAL session_log_users = TRUE;
Format of the user.log
Here is an example of a user.log entry
:
2016-10-06 20:56:41.292686 UTC fcs022.example.com clxnode:
USER SID:1857340417 db=#undef user=root@localhost LOGIN
This is a list of the data found within the user.log.
Field | Description |
---|---|
Timestamp | Date and time of the log entry. Includes the time zone. |
hostname | Name of the host accessed by the user. |
process name | The Xpand process name ( |
USER | This identifier precedes user-specific information. |
SID | Session ID. |
db | Name of the database specified when the user logged in. |
user | Username. |
activity performed |
|