Is it possible to monitor number of users logged in over a period of time?

Michael M1
Giga Expert

I would like to trend number of concurrent users/sessions over a period of time.

The only things I see in the platform are 'Active Transactions' or the Event log and query for login/logout and then do some work in Excel.

Is there a better method for doing this?

3 REPLIES 3

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

I am not aware of anything iwthin the instance tracking that.   xmlstats.do includes session information like the number of logged_in users and even a breakdown of those users.   Some customers are using that site with an application monitoring tool to capture details.



https://INSTANCENAME.service-now.com/xmlstats.do


SanjivMeher
Kilo Patron
Kilo Patron

May be you can run a report on user table based on their last login time?



Please mark this response as correct or helpful if it assisted you with your question.

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