Number of logins to Confluence Datacenter

Paul Logan May 31, 2024

Hello,

 

I know i can get last login in details for users, however is there a way i can generate a report to see how many times users has logged into Confluence datacenter?

 

Regards,

Paul.

2 answers

0 votes
Andrii Maliuta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2024

Hello @Paul Logan ,

You can try using Confluence DC Java API for this :

 

import com.atlassian.confluence.security.login.LoginManager
import com.atlassian.confluence.security.login.LoginInfo


LoginManager loginManager - ComponentLocator.getComponent(LoginManager.class);

String userName = "USERNAME";

LoginInfo loginInfo = loginManager.getLoginInfo(userName);

int cfl = getCurrentFailedLoginCount();
Date lastFailedLoginDate = getLastFailedLoginDate()
Date lastSuccessfulLoginDate = getLastSuccessfulLoginDate()
Date previousSuccessfulLoginDate = getPreviousSuccessfulLoginDate()
int totalFailedLoginCount = getTotalFailedLoginCount()
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 31, 2024

How does this show how many times a user has logged in? :-)

0 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 31, 2024

Hi Paul,

I'm quite sure the amount of logins is not being tracked anywhere.

The LOGININFO table in the database keeps track of:

  • current amount of failed logins
  • total amount of failed logins
  • last successful login
  • previous successful login
  • last failed login

But nothing about the total logins per user.

Paul Logan June 3, 2024

@Charlie Misonne Thank you. 

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2024

You're welcome!

If this answers your question please mark as accepted :-)

Something else I was thinking about: perhaps you can use the information in the access logs. But you will have to parse it and it might be difficult to see when a user logs in from the access log.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.5
TAGS
AUG Leaders

Atlassian Community Events