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 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.

Global Variable

User logging is controlled by the global variable session_log_users and is disabled by default. This variable is not available by session.

NameDescriptionDefault Value
session_log_usersLog users and LOGIN/LOGOUT to user.log.false

To activate user logging, run the following sql:

sql> SET GLOBAL session_log_users = true;

Reading the user.log

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 [email protected] LOGIN

This is a list of the data found within the user.log.  

TimestampDate and time of the log entry. Includes the time zone.
hostnameName of the host accessed by the user. 
process nameThe Xpand process name (clxnode).
USERThis identifier precedes user-specific information.
SIDSession ID.
dbName of the database specified when the user logged in.
activity performedLOGIN or LOGOUT.
  • No labels