ClustrixDB 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 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.
User logging is controlled by the global variable session_log_users and is disabled by default. This variable is not available by session.
|session_log_users||Log users and LOGIN/LOGOUT to user.log.||false|
To activate user logging, run the following sql:
sql> SET GLOBAL session_log_users = true;
Here is an example of a user.log entry:
2016-10-06 20:56:41.292686 UTC fcs022.colo.sproutsys.com clxnode: USER SID:1857340417 db=#undef user=root@localhost LOGIN
This is a list of the data found within the user.log.
|Timestamp||Date and time of the log entry. Includes the time zone.|
|hostname||Name of the host accessed by the user.|
|process name||The ClustrixDB process name (clxnode).|
|USER||This identifier precedes user-specific information.|
|db||Name of the database specified when the user logged in.|
|activity performed||LOGIN or LOGOUT.|