Track HTTP requests in Websphere

眉间皱痕 提交于 2019-12-01 06:02:06

问题


I have the following requirement: I want to track all requests, that go through our WebSphere servers. We have some web applications, and some web services deployed to our servers. However, i don't want to add that tracking mechanism to each application.

Is there a possibility, to add some plugin or to create a filter for the WebSphere server, where i can read the request (i need some additional data from the request, like username, and session id for the tracking)?
Or is the only solution for that problem some kind of proxy server, which i have to put before our WebSphere server and which can process the tracking?

We are using WebSphere 8.


回答1:


At first there is a kind of HTTP request logging that can be done in Websphere version 8.

From the administration console choose Servers > Server Types > WebSphere application servers > server_name > Troubleshooting > NCSA access and HTTP error logging

Once you enable Access Logging and Error Logging you have Web server like HTTP logs in the WAS logs directory.

In case you need additional information, like the HTTP headers you mentioned, you should enable the following traces:

com.ibm.ws.http.HttpConnection=finest:
com.ibm.ws.http.HttpRequest=finest:
com.ibm.ws.http.HttpResponse=finest

More on this you can find here.



来源:https://stackoverflow.com/questions/9497418/track-http-requests-in-websphere

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!