跟踪Websphere中的HTTP请求 [英] Track HTTP requests in Websphere

查看:265
本文介绍了跟踪Websphere中的HTTP请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下要求:我想跟踪通过我们的WebSphere服务器的所有请求。我们有一些Web应用程序,以及部署到我们服务器的一些Web服务。但是,我不想将跟踪机制添加到每个应用程序。

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.

是否有可能添加一些插件或为WebSphere服务器创建过滤器,我可以在哪里读取请求(我需要来自请求的一些额外数据,如用户名和跟踪的会话ID)?

或者是该问题的唯一解决方案某种代理服务器,我必须放在我们的WebSphere服务器之前,哪个可以处理跟踪?

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?

我们正在使用WebSphere 8。

We are using WebSphere 8.

推荐答案

首先,有一种HTTP请求记录可以在Websphere版本8中完成。

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

从管理控制台中选择服务器>服务器类型> WebSphere应用程序服务器> server_name>故障排除> NCSA访问和HTTP错误记录

启用访问记录后错误记录您在WA中拥有类似HTTP日志的Web服务器S日志目录。

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

如果您需要其他信息,例如您提到的HTTP标头,您应该启用以下跟踪:

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

更多相关信息你可以找到 here

More on this you can find here.

这篇关于跟踪Websphere中的HTTP请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆