The CreatorCon Call for Content is officially open! Get started here.

Report to show current logged in users in the instance

abuthahir
Tera Expert

Hi All,

I have a requirement to create a report to display currently logged in users in the instance. Would like to create a dashboard to monitor the logged in users from specific group. Is there a way to create this report,.? ctomasi pradeepksharma nathanfirth

Note :   i have tried "Logged in users" module and it shows only users from my node and not all the node.

6 REPLIES 6

Dom Gattuso
Mega Sage

I've written the following server side script that iterates through all nodes and captures the sum of all users for each node:

var total_users = 0;
var diag = new Diagnostics();
	
while (diag.nextNode()) {
   var diagNode = diag.getNode();	
   var ss = diagNode.stats.sessionsummary;
	
   if(ss){
      total_users  += parseInt(diagNode.stats.sessionsummary["@logged_in"]);
   }
}

gs.info(total_users);

You can put this into a UI Page (attached xml) and add it to a dashboard. The attached UI page will look similar to the single score report "Logged in users" which is a count of all records in the v_user_session table (showing all logged in users for the same node you are on): 

find_real_file.png

Hope that helps! 

Thanks, 

- Dom

Hi Dom,

I need to show the list of logged-in and logged-out users. Can you please provide me a code to fetch the details or any hint?

Regards,

Shubham Singh