Getting users login history and frequency

hisyam
Level 3
Getting users login history and frequency

I'm running into an issue where I want to get the users' login frequency into the dataiku application. I've referred to a similar post at

https://community.dataiku.com/t5/Using-Dataiku/User-Login-History/m-p/13154#M5761

However, when I tried checking the message.callPath, I can't find the /api/login information even when I filtered the column. I've been logging in frequently but I don't even see any information about my logins and past logins.

Can anyone help to clarify on this? Or provide any alternative on how I can get users' login frequency into app, if possible without coding.


Operating system used: Linux

0 Kudos
4 Replies
CatalinaS
Dataiker

Hi @hisyam

An alternative solution is to filter the audit logs outside DSS. You can download the audit logs on a local folder and then filter the audit files by making use of grep command. You can run the following command in a terminal from the audit logs folder:

 

 $ cat audit.log* | grep login-success > output.txt

 

This will produce an output file that contains only the successful login entries.

Then import the output file output.txt in DSS and you should see the column with message.callPath containing the value /api/login along with the columns message.login and timestamp that will be use to calculate users' login frequency:

Screenshot 2023-07-12 at 17.23.22.png

After that you can use a group recipe with the group key message.login to get the login frequency for each user:

Screenshot 2023-07-12 at 17.01.36.png

 

hisyam
Level 3
Author

Weird thing is that, when I import the audit logs, I dont see column for message.login. Also that there are null values in the rows which I assumed isn't supposed to happen, right?

Also that I've noticed that the message.callPath in my rows have a pattern such as shown in the picture below. /api/tintercom/<some activity>. But still no login info.

I've also done what you have suggested, but still couldn't extract the information.

Is the issue related to any configuration on my server or DSS instance since I'm not getting the full output of my audit?

0 Kudos
Turribeach

How exactly are loding the audit logs? Please describe your whole flow, which files you are loading, from where, etc. 

0 Kudos
hisyam
Level 3
Author

The way I import them is as follows:

1. Import from Filesystem

2. Read from filesystem_root. Then point the path to where my audit logs are

Example: /home/admin_sm/DATA_DIR/run/audit/

3. File selection: All

The rest of the options, I have left it as it is.

0 Kudos