Enable Intelligent Management in the WebSphere plug-in trace
Intelligent Management in the WebSphere plug-in trace is enabled using the <traceSpecification> tag.
Use the <traceSpecification> tag to enable both control and request-based tracing. To enable this tracing, see, Configure trace on the web server plug-in. For more information on the properties of the <traceSpecification> tag, see Dynamic Routing-1.0.
- To set the :DEBUG control trace for webserver1 and webserver2 , add the following code to the server.xml of the controller.
<dynamicRouting> <traceSpecification name="default" specification=":DEBUG" webservers="webserver1, webserver2" /> </dynamicRouting>This change is communicated to the web server if it is already connected to the Dynamic Routing service.
Set the name parameter to default to use the control trace specification. See Configure trace on the web server plug-in for more information. Configure different control trace specifications for different web servers. For example:
<dynamicRouting> <traceSpecification name="default" specification=":DEBUG" webservers="webserver1" /> <traceSpecification name="default" specification="request.http:DEBUG" webservers="webserver2" /> </dynamicRouting>
- To configure request-based trace specifications for webserver1, add the following code to the server.xml of the controller.
<dynamicRouting> <traceSpecification name="custom1" specification="request.http:DEBUG" condition="uri = '/foo'" webservers="webserver1" /> </dynamicRouting>The condition property is required for request-based trace specifications. The condition property specifies an expression that is evaluated by Intelligent Management in the plug-in for each request. The specified trace specification is set for the requests that match the expression. For information regarding the format of the condition parameter, see Configure trace on the web server plug-in.
Request-based trace specifications are evaluated in the order they are specified. If two trace specifications with same name are specified, the one that comes later takes precedence. In the following example, control.process:DEBUG is used for the control specification for webserver1:
<dynamicRouting> <traceSpecification name="default" specification=":DEBUG" webservers="webserver1" /> <traceSpecification name="default" specification="control.process:DEBUG" webservers="webserver1" /> </dynamicRouting>Use “*“ to set the trace specification for all the web servers that are connected to the Dynamic Routing service. If we have a specification value containing actual webserver names, the webserver specification replaces the “*“ specification, regardless of order, because of specificity. The order replacement occurs when both specifications are equally targeted for “*“ or for the same webservers.
<dynamicRouting> <traceSpecification name="default" specification=":DEBUG" webservers="*" /> <traceSpecification name="custom1" specification="http.request.rules:DEBUG" condition="uri = '/foo'" webservers="webserver1,webserver3" /> <traceSpecification name="custom2" specification="http.response:DEBUG" condition="uri = '/foo'" webservers="webserver1,webserver4" /> <traceSpecification name="custom3" specification="http.request.select:DEBUG" condition="virtualhost = 'ibm.com'" webservers="*" /> </dynamicRouting>
Parent topic:Set up Dynamic Routing for Liberty collectives
Tasks:
Generating a plugin-cfg.xml to route to multiple collectives Reference:
Dynamic Routing command