Logging User Actions

Logging User Actions

The user action logger (useraction.log) is logging common actions a Datameer X user performs (e.g. create files, assign users to groups, or rename workbook sheets). The log file useraction.log is created by a Log4j rolling file appender and can be configured in the Log4j properties file. Entries are stored as JSON objects and can easily be analyzed with Datameer. 

Log file location

The log file location depends on the Datameer X installation (let <DATAMEER_HOME> be the installation director, <USER> the user that installed/started Datameer X and <VERSION> your current Datameer X version).

InstallationLocation
Normal Distribution<DATAMEER_HOME>/logs/useraction.log
Mac OS X Package/Users/<USER>/Library/Application Support/Datameer/<VERSION>/logs/useraction.log
Windows ExecutableC:\Users\<USER>\AppData\Local\Datameer\<VERSION>\logs\useraction.log

Log format (JSON schema)

The log file contains one action per line. User actions are represented as JSON objects. Each action object has the following fields:

  • timestamp (YYYY-MM-DD HH:MM:SS)
  • action type (general action category, i.e. FILESYSTEM, PERMISSION, JOB, WORKBOOK, AUTHENTICATION or USER_MANAGEMENT)
  • action (concrete action; possible values depend on the action type)
  • performing user (Datameer X user name)
  • roles of the performing user (as assigned in the Datameer X user management)
  • IP address of performing user
Depending on the action logged, other fields might be set. The following table contains the logged action type, action, and additional fields used in the log entry for each user action performed. Unused fields are set to null.
Action performedLogged action typeLogged actionAdditional JSON fields
file createdFILESYSTEMCREATEfile-uuid, file-path, file-type-id, connection-id, connection-name, connection-type-id
file deletedFILESYSTEMDELETEfile-uuid, file-path
file editedFILESYSTEMEDITfile-uuid, file-path
file movedFILESYSTEMMOVEfile-uuid, file-path
file renamedFILESYSTEMRENAMEfile-uuid, file-path, old-name
folder createdFILESYSTEMCREATEfolder-path
folder deletedFILESYSTEMDELETEfolder-path
folder movedFILESYSTEMMOVEfolder-path
folder renamedFILESYSTEMRENAMEfolder-path, old-name
import applicationFILESYSTEMIMPORT_APPLICATIONapplication-uuid, application-path
export applicationFILESYSTEMEXPORT_APPLICATIONapplication-uuid, application-path
group permission added to filePERMISSIONADD_GROUP_PERMISSIONfile-uuid, file-path, group-name, read-permission, write-permission, execute-permission
group permission added to folderPERMISSIONADD_GROUP_PERMISSIONfolder-path, group-name, read-permission, write-permission
full data group permission
added to workbook
PERMISSIONADD_FULL_DATA_GROUP_PERMISSIONfile-uuid, file-path, group-name, read-permission, write-permission, execute-permission
full data group permission
removed from workbook
PERMISSIONREMOVE_FULL_DATA_GROUP_PERMISSIONfile-uuid, file-path, group-name
group permission removed from filePERMISSIONREMOVE_GROUP_PERMISSIONfile-uuid, file-path, group-name
group permission removed from folderPERMISSIONREMOVE_GROUP_PERMISSIONfolder-path, group-name
update other permission of filePERMISSIONUPDATE_PERMISSION_OF_OTHERSfile-uuid, file-path, read-permission, write-permission, execute-permission
update other permission of folderPERMISSIONUPDATE_PERMISSION_OF_OTHERSfolder-path, read-permission, write-permission
update share flag of infographicPERMISSIONUPDATE_SHARE_FLAG_OF_INFOGRAPHICfile-uuid, file-path, shared-public
full data other permission 
updated of workbook
PERMISSIONUPDATE_FULL_DATA_PERMISSION_OF_OTHERSfile-uuid, file-path, read-permission, write-permission, execute-permission
update owner of filePERMISSIONCHANGE_OWNERfile-uuid, file-path, new-owner
update owner of folderPERMISSIONCHANGE_OWNERfolder-path, new-owner
start job executionJOBSTART_EXECUTION

execution-id, execution-type, execution-triggered-by, execution-job-schedule, execution-configuration-path,
execution-configuration-uuid, execution-job-status, execution-job-user

stop job execution (with or w/o data)JOBSTOP_EXECUTIONexecution-id, execution-type, execution-triggered-by, execution-job-schedule, execution-configuration-path,
execution-configuration-uuid, execution-job-status, execution-job-user, data-uuid, data-path
download full data (workbook)JOBDOWNLOAD_FULL_DATAworkbook-uuid, workbook-path
download full data (import job)JOBDOWNLOAD_FULL_DATAdatasource-uuid, datasource-path
move workbook sheet columnWORKBOOKMOVE_COLUMNworkbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-name, workbook-sheet-column-index
remove workbook sheet columnWORKBOOKREMOVE_COLUMNworkbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-name
rename workbook sheet columnWORKBOOKRENAME_COLUMNworkbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-name, old-name
create workbook sheetWORKBOOKCREATE_SHEETworkbook-uuid, workbook-path, workbook-sheet-name
remove workbook sheetWORKBOOKREMOVE_SHEETworkbook-uuid, workbook-path, workbook-sheet-name
move workbook sheetWORKBOOKMOVE_SHEETworkbook-uuid, workbook-path, workbook-sheet-name
link data sourceWORKBOOKLINK_DATASOURCEworkbook-uuid, workbook-path, workbook-sheet-name, datasource-uuid, datasource-path
add workbook sheet formulaWORKBOOKADD_FORMULAworkbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-index
remove workbook sheet formulaWORKBOOKREMOVE_FORMULAworkbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-index
add workbook sheet filterWORKBOOKADD_FILTERworkbook-uuid, workbook-path, workbook-sheet-name
remove workbook sheet filterWORKBOOKREMOVE_FILTERworkbook-uuid, workbook-path, workbook-sheet-name
add workbook sheet sortWORKBOOKADD_SORTworkbook-uuid, workbook-path, workbook-sheet-name
remove workbook sheet sortWORKBOOKREMOVE_SORTworkbook-uuid, workbook-path, workbook-sheet-name
add workbook join sheetWORKBOOKADD_JOINworkbook-uuid, workbook-path, workbook-join-sheets
user loginAUTHENTICATIONLOGIN
user unable to authenticateAUTHENTICATIONUNABLE_TO_AUTHENTICATEuser-name
user login attempt on disabled accountAUTHENTICATIONLOGIN_ATTEMPT_ON_DISABLED_USERuser-name
user logoutAUTHENTICATIONLOGOUT
user session timeoutAUTHENTICATIONSESSION_TIMEOUT
create user groupUSER_MANAGEMENTCREATE_GROUPgroup-name
rename user groupUSER_MANAGEMENTRENAME_GROUPgroup-name, old-name
delete user groupUSER_MANAGEMENTDELETE_GROUPgroup-name
create roleUSER_MANAGEMENTCREATE_ROLErole-name
rename roleUSER_MANAGEMENTRENAME_ROLErole-name, old-name
delete roleUSER_MANAGEMENTDELETE_ROLErole-name
remove role from userUSER_MANAGEMENTREMOVE_ROLE_FROM_USERuser-name, role-name
add role to userUSER_MANAGEMENTADD_ROLE_TO_USERuser-name, role-name
remove user from groupUSER_MANAGEMENTREMOVE_USER_FROM_GROUPgroup-name, user-name
add user to groupUSER_MANAGEMENTADD_USER_TO_GROUPgroup-name, user-name
create userUSER_MANAGEMENTCREATE_USERuser-name
update password of userUSER_MANAGEMENTUPDATE_PASSWORDuser-name
delete userUSER_MANAGEMENTDELETE_USERuser-name
enable userUSER_MANAGEMENTENABLE_USERuser-name
disable userUSER_MANAGEMENTDISABLE_USERuser-name

Log4j appender configuration

The Log4j appender is configured in the corresponding Log4j properties file. The configuration looks like this:

#file appender user action logger
log4j.category.datameer.dap.conductor.metrics.RollingFileJsonReporter=INFO, useraction
log4j.additivity.datameer.dap.conductor.metrics.RollingFileJsonReporter=false
log4j.appender.useraction=org.apache.log4j.RollingFileAppender
log4j.appender.useraction.layout=org.apache.log4j.PatternLayout
log4j.appender.useraction.layout.ConversionPattern=%m%n
log4j.appender.useraction.File=logs/useraction.log
log4j.appender.useraction.MaxFileSize=100MB
log4j.appender.useraction.MaxBackupIndex=10

Importing the log file to Datameer

The log file can be imported as either an import job or a file upload. Specify JSON as file type. The schema is detected automatically.