Datalore 2024.1 Help

Enable user activity logging

User activity logging is an Enterprise-only feature that allows you to log user activities. Below is an example of logged user actions:

$ tail -f /tmp/datalore/datalore.log
{"@timestamp":"2022-10-11T14:46:14.594+02:00","@version":"1","message":"Audit logging event","logger_name":"audit","thread_name":"Computation edt_0_0","level":"TRACE","level_value":5000,"id":"B9otorSZuP2n2vyTHCkhLe","timestamp":"1665492374594","event_type":"run_cell","user_id":"pEoHIeNPj4DE43XInXC5OV","cell_content":"print(123)","file_id":"pEoHIeNPj4DE43XInXC5OV\/cEFzZVm3xAYFg3nvWeZqnT"}

Enable user activity logging

  1. Open the datalore.values.yaml file and navigate to the logbackConfig key.

  2. Choose a logback appender, add the net.logstash.logback.encoder.LogstashEncoder encoder for it and specify your logger configuration in place of <logger name="audit" level="OFF"/> as shown in the example below.

    <configuration> ... <appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>/tmp/datalore/datalore.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>datalore.%d{yyyy-MM-dd}.log</fileNamePattern> <maxHistory>30</maxHistory> <totalSizeCap>300GB</totalSizeCap> </rollingPolicy> <encoder class="net.logstash.logback.encoder.LogstashEncoder"/> </appender> <logger name="audit" level="ALL" additivity="false"> <appender-ref ref="AUDIT"/> </logger> ... </configuration>
Last modified: 26 March 2024