How to get a list of contacts who has logged into Service Desk Manager?
search cancel

How to get a list of contacts who has logged into Service Desk Manager?

book

Article ID: 14867

calendar_today

Updated On:

Products

SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service CA Service Desk Manager CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

I need a list of all contacts which have logged in and out in a given time period, let us say for the last week. How can I achieve this?

Environment

CA Service Desk Manager - All Versions.

Resolution

This information is stored in the session_log table. You can extract the information with a SQL query like:

select ca_contact.userid,session_log.*
from
session_log
FULL JOIN ca_contact on session_log.contact=ca_contact.contact_uuid
where (login_time > 1580418371 AND login_time < 1580444127) order by login_time

Since all timestamps are stored in Unix epoch time, you will need to use a converter to get the epoch time you need.
The earliest date is the first time, the end date is the second one.

You can use an online converter like: http://www.unixtimestamp.com/

 

Additional Information

Note 1: Logins from the web interface will return as a session_type 1, while web services are a session_type of 3

Note 2: If you are not using the session_log table information for reporting on users log in and out of Service Desk; then you can turn off session logging by placing the following parameter in NX.env and recycling service:

@NX_SESSION_LOG_EXCLUDE=ALL