How to log statistics regarding web services sessions

book

Article ID: 15273

calendar_today

Updated On:

Products

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

Issue/Introduction



How can we find out more information about web services sessions, such as login time, login user, IP address of the logged in user, and  API call?

Environment

CA Service Desk Manager 12.9 Cumulative patch #1 and above.

Resolution

Use the following commands to install the WEBSVC_LOGGING option and then recycle the CA Service Desk Manager (CA SDM) service(s):

pdm_options_mgr -c -s WEBSVC_LOGGING -v 1 -a pdm_option.inst 

pdm_options_mgr -c -s WEBSVC_LOGGING -v 1 -a pdm_option.inst -t 

Note: You must run the commands and recycle the CA SDM services as per the best practices for the configuration type of the environment (i.e. Conventional primary/secondaries or Advanced Availability). 

The information that is logged for every web services session includes the IP address from where the request originated, the username, the web services method being called, the Session ID, and the timestamp of the request.

The logging information is written in the jsrvr.log. 

Sample Output:

07/21 05:06:29.891[http-bio-8080-exec-1] INFO USDLogHandler ? USDJWS: 7/21/17 5:06:29 AM EDT - xxx.xxx.xxx.xxx - ServiceDesk : login 
07/21 05:06:31.589[http-bio-8080-exec-1] INFO usdjws65 ? Web Services session created 974255711 from caller IP xxx.xxx.xxx.xxx 
07/21 05:14:56.149[http-bio-8080-exec-6] INFO USDLogHandler ? USDJWS: 7/21/17 5:14:56 AM EDT - xxx.xxx.xxx.xxx - 974255711 : doSelect - objectType=pcat, whereClause=tenant.name LIKE 'tenantA%' AND sym='area1tenantABC' 
07/21 05:14:56.978[http-bio-8080-exec-7] INFO USDLogHandler ? USDJWS: 7/21/17 5:14:56 AM EDT - xxx.xxx.xxx.xxx - 974255711 : doSelect - objectType=pcat, whereClause=tenant.name LIKE 'tenantA%' AND sym='area1tenantABC' 

In the above, xxx.xxx.xxx.xxx would be replaced with a real IP address. 

There may be some level of performance impact due to I/O and also quicker filling up and rolling over of the jsrvr logs. 

Per best practice, try it out in a test environment first.

Additional Information

TEC467812 Debugging Service Desk Web Services API issues

TEC599740 Using Wireshark to trace SOAP based Web Services calls

TEC1602399 How to determine if ServiceDesk is setup in Advance Availability (AA) mode or Conventional mode and what System Configuration is being used?

TEC1788456 Best Practice for PDM_OPTIONS_MGR Changes in a Service Desk Manager (SDM) Advanced Availability (AA) Installation