Macro for displaying the number of daily log-ins for the last 30 days


Could anyone please help me on this? We are trying to get data on how much Confluence is used by one of our clients.



2 answers

1 accepted

0 votes
Accepted answer

Hi Boris - I did not find anything to help my case from the "cwd_user_attribute" table. The investigation led me to the "logininfo" and "cwd_user" tables. With these I am able to list the names of users who logged in to Confluence for the last 30 days.

I however discovered that Confluence does not keep in the database a history of user logins (somebody correct me here please). It just has two columns, "successdate" and "prevsuccessdate". When a user logs-in the next date, it updates these 2 columns accordingly.

This brings me to trying the "user logging" information. Could anybody please show me how to extract data from the log file using Bob Swift's SQL Plugin, or by creating a new User Macro?

Thanks again.


0 votes
Boris Berenberg Community Champion Nov 29, 2012

Hey Doods,

You can not get a historical account from within Confluence. There are 2 alternative methods:

1. You can enable user access logging per the directions here: and then parse the resulting logs

2. Record when someone last authenticated regularly, then parse that data. You can modify the query:

select user_id from cwd_user_attribute where attribute_name = 'lastAuthenticated';

to pull more info from the cwd_user_attribute table (in this case you will also need the date).


Thanks Boris. I will try it and post my findings here. :)

This does not work if you use other user directories, it works only with local ones. Seems to be a bug.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

How Scrum works? It starts with training and education

To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?”  That question applies to both implementation and improvements on the Scrum framew...

168 views 3 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you