Logging User Actions
Logging User Actions
The user action logger (useraction.log) is logging common actions a Datameer 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 installation (let <DATAMEER_HOME> be the installation director, <USER> the user that installed/started Datameer and <VERSION> your current Datameer version).
Installation | Location |
---|---|
Normal Distribution | <DATAMEER_HOME>/logs/useraction.log |
Mac OS X Package | /Users/<USER>/Library/Application Support/Datameer/<VERSION>/logs/useraction.log |
Windows Executable | C:\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 user name)
- roles of the performing user (as assigned in the Datameer user management)
- IP address of performing user
Action performed | Logged action type | Logged action | Additional JSON fields |
---|---|---|---|
file created | FILESYSTEM | CREATE | file-uuid, file-path, file-type-id, connection-id, connection-name, connection-type-id |
file deleted | FILESYSTEM | DELETE | file-uuid, file-path |
file edited | FILESYSTEM | EDIT | file-uuid, file-path |
file moved | FILESYSTEM | MOVE | file-uuid, file-path |
file renamed | FILESYSTEM | RENAME | file-uuid, file-path, old-name |
folder created | FILESYSTEM | CREATE | folder-path |
folder deleted | FILESYSTEM | DELETE | folder-path |
folder moved | FILESYSTEM | MOVE | folder-path |
folder renamed | FILESYSTEM | RENAME | folder-path, old-name |
import application | FILESYSTEM | IMPORT_APPLICATION | application-uuid, application-path |
export application | FILESYSTEM | EXPORT_APPLICATION | application-uuid, application-path |
group permission added to file | PERMISSION | ADD_GROUP_PERMISSION | file-uuid, file-path, group-name, read-permission, write-permission, execute-permission |
group permission added to folder | PERMISSION | ADD_GROUP_PERMISSION | folder-path, group-name, read-permission, write-permission |
full data group permission added to workbook | PERMISSION | ADD_FULL_DATA_GROUP_PERMISSION | file-uuid, file-path, group-name, read-permission, write-permission, execute-permission |
full data group permission removed from workbook | PERMISSION | REMOVE_FULL_DATA_GROUP_PERMISSION | file-uuid, file-path, group-name |
group permission removed from file | PERMISSION | REMOVE_GROUP_PERMISSION | file-uuid, file-path, group-name |
group permission removed from folder | PERMISSION | REMOVE_GROUP_PERMISSION | folder-path, group-name |
update other permission of file | PERMISSION | UPDATE_PERMISSION_OF_OTHERS | file-uuid, file-path, read-permission, write-permission, execute-permission |
update other permission of folder | PERMISSION | UPDATE_PERMISSION_OF_OTHERS | folder-path, read-permission, write-permission |
update share flag of infographic | PERMISSION | UPDATE_SHARE_FLAG_OF_INFOGRAPHIC | file-uuid, file-path, shared-public |
full data other permissionĀ updated of workbook | PERMISSION | UPDATE_FULL_DATA_PERMISSION_OF_OTHERS | file-uuid, file-path, read-permission, write-permission, execute-permission |
update owner of file | PERMISSION | CHANGE_OWNER | file-uuid, file-path, new-owner |
update owner of folder | PERMISSION | CHANGE_OWNER | folder-path, new-owner |
start job execution | JOB | START_EXECUTION | execution-id, execution-type, execution-triggered-by, execution-job-schedule, execution-configuration-path, |
stop job execution (with or w/o data) | JOB | STOP_EXECUTION | execution-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) | JOB | DOWNLOAD_FULL_DATA | workbook-uuid, workbook-path |
download full data (import job) | JOB | DOWNLOAD_FULL_DATA | datasource-uuid, datasource-path |
move workbook sheet column | WORKBOOK | MOVE_COLUMN | workbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-name, workbook-sheet-column-index |
remove workbook sheet column | WORKBOOK | REMOVE_COLUMN | workbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-name |
rename workbook sheet column | WORKBOOK | RENAME_COLUMN | workbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-name, old-name |
create workbook sheet | WORKBOOK | CREATE_SHEET | workbook-uuid, workbook-path, workbook-sheet-name |
remove workbook sheet | WORKBOOK | REMOVE_SHEET | workbook-uuid, workbook-path, workbook-sheet-name |
move workbook sheet | WORKBOOK | MOVE_SHEET | workbook-uuid, workbook-path, workbook-sheet-name |
link data source | WORKBOOK | LINK_DATASOURCE | workbook-uuid, workbook-path, workbook-sheet-name, datasource-uuid, datasource-path |
add workbook sheet formula | WORKBOOK | ADD_FORMULA | workbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-index |
remove workbook sheet formula | WORKBOOK | REMOVE_FORMULA | workbook-uuid, workbook-path, workbook-sheet-name, workbook-sheet-column-index |
add workbook sheet filter | WORKBOOK | ADD_FILTER | workbook-uuid, workbook-path, workbook-sheet-name |
remove workbook sheet filter | WORKBOOK | REMOVE_FILTER | workbook-uuid, workbook-path, workbook-sheet-name |
add workbook sheet sort | WORKBOOK | ADD_SORT | workbook-uuid, workbook-path, workbook-sheet-name |
remove workbook sheet sort | WORKBOOK | REMOVE_SORT | workbook-uuid, workbook-path, workbook-sheet-name |
add workbook join sheet | WORKBOOK | ADD_JOIN | workbook-uuid, workbook-path, workbook-join-sheets |
user login | AUTHENTICATION | LOGIN | |
user unable to authenticate | AUTHENTICATION | UNABLE_TO_AUTHENTICATE | user-name |
user login attemptĀ on disabled account | AUTHENTICATION | LOGIN_ATTEMPT_ON_DISABLED_USER | user-name |
user logout | AUTHENTICATION | LOGOUT | |
user session timeout | AUTHENTICATION | SESSION_TIMEOUT | |
create user group | USER_MANAGEMENT | CREATE_GROUP | group-name |
rename user group | USER_MANAGEMENT | RENAME_GROUP | group-name, old-name |
delete user group | USER_MANAGEMENT | DELETE_GROUP | group-name |
create role | USER_MANAGEMENT | CREATE_ROLE | role-name |
rename role | USER_MANAGEMENT | RENAME_ROLE | role-name, old-name |
delete role | USER_MANAGEMENT | DELETE_ROLE | role-name |
remove role from user | USER_MANAGEMENT | REMOVE_ROLE_FROM_USER | user-name, role-name |
add role to user | USER_MANAGEMENT | ADD_ROLE_TO_USER | user-name, role-name |
remove user from group | USER_MANAGEMENT | REMOVE_USER_FROM_GROUP | group-name, user-name |
add user to group | USER_MANAGEMENT | ADD_USER_TO_GROUP | group-name, user-name |
create user | USER_MANAGEMENT | CREATE_USER | user-name |
update password of user | USER_MANAGEMENT | UPDATE_PASSWORD | user-name |
delete user | USER_MANAGEMENT | DELETE_USER | user-name |
enable user | USER_MANAGEMENT | ENABLE_USER | user-name |
disable user | USER_MANAGEMENT | DISABLE_USER | user-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.