How to access audit logs using python?

Options
ligia_tzab
ligia_tzab Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 9

Hi, we have a project in which we want to monitor the logins and logouts of our Dataiku instance's users.

We need to use a Python recipe that imports the Dataiku log files directly from the instance without downloading and uploading them, but we don't know how to establish that connection between the log files and the Python recipe? We are not interested in modifying the files, only reading these.

Any information would be appreciated!

Tagged:

Answers

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 293 Dataiker
    Options

    Hi @ligia_tzab
    ,

    You may set up a connection to the filesystem path that hosts the logs (Administrations > Connections). You can then point a managed folder or dataset to that destination and read in the data.

    If you have not done so already, you will need to install and configure an event server to host the audit logs. Please see the following docs for full details:

    https://doc.dataiku.com/dss/latest/operations/audit-trail/eventserver.html

    https://doc.dataiku.com/dss/latest/operations/audit-trail/index.html

    Please let me know if you have questions.

    Kind Regards,

    Jordan

  • ligia_tzab
    ligia_tzab Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 9
    Options

    Thank you, it was very useful.
    Now, we have another problem. We want to search all actions carried out by users such as creation, visualization, modification, execution, deletion and any other possible action in graphs that are made in the char tab of the datasets, notebooks and dashboards.

    Also, to identificate the logs of modifications on dashboards in logs files we have been using the values ["message]["msgType"]: "dashboard-create", ["message]["msgType"]: "taggable-object-delete" and ["message][ "msgType"]: "dashboards-read-meta" and we want to validate the meaning of these.

    How can we locate these logs, the user who created them and the project in which they were created?

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 293 Dataiker
    Options

    Hi @ligia_tzab
    ,

    The easiest way to do this would be to create a managed folder pointing to the audit logs (api-calls) and then create a "files in folder" dataset (+dataset > Internal > Files in folder). You can then use a prepare recipe to parse out the relevant rows.

    Thanks!

    Jordan

  • ligia_tzab
    ligia_tzab Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 9
    Options

    Thank you a lot, another think, how to obtain the name of a dashboard with using its id?

Setup Info
    Tags
      Help me…