Configure trace on the WebSphere plug-in
Configure tracing on the web server to collect specific log levels from the environment. The logs are recorded in the standard plug-in log file...
plugins_root/logs/web_server/http_plugin.log
There are two types of processing in the plug-in: request processing and control processing. Request processing consists of any logic required to process an HTTP request, or the HTTP response from the origin server. Control processing is any processing that does not fall into the request processing category. For example, all communication with the REST service to discover routing information is considered control processing.
For trace setting, the following precedence hierarchy applies:
- Default trace hierarchy
- If the default trace specification is set, the control trace specification is used.
- If no default trace specification is set, the NOTICE trace level is used.
- Request trace hierarchy
- If a rule matches a request, the trace specification of this rule is used.
- If the rule does not match the request, and the DefaultRequestTraceSpec property is set, the trace specification in DefaultRequestTraceSpec property is used.
- If the rule does not match the request, the DefaultRequestTraceSpec property is not set, but the control trace specification is set, then the control trace specification is used.
- If none of these specifications are set, the NOTICE trace level is used.
Use the subexpression builder to build complex rule conditions from subexpression using AND, OR, NOT, and parenthetical grouping. The rule builder validates the rule when applying the changes, and alerts you to mismatched parentheses, and unsupported logic operators.
The operand is part of the classification rule that the run time uses to match a rule to a job. For instance, if we specify a protocol type equal to HTTP, the runtime searches for a job that has a protocol type of HTTP. The following list includes operand choices:
Operand Syntax Description Virtual host virtualhost Virtual host target of the request, which is used for configuring web applications to a particular host name. Virtual port numeric Virtual port target of the request, which is used for configuring web applications to a particular port. URI uri Uniform Resource Identifier Helps you identify the path of the request: if the URL is http://host:port/path?p1=v1, the path is path.
User ID userid Return the user ID for the authenticated user who sent the request. Group ID groupingid Returns a list of group names for the authenticated user who sent the request. Request query parameter name queryparm$<name> A header name and value. For example, the expression queryparm$timezone='EST' tests a request to see whether the request contains an HTTP query parameter named timezone with a value of EST. To test for presence or absence of a query parameter, use one of the following forms:
queryparm$timezone IS NOT NULL queryparm$timezone IS NULLRequest header name header$<name> A header name and value. For example, the expression header$Host='localhost' tests a request to see whether it contains an HTTP host header with a value of localhost. To test for presence or absence of the host header, use one of the following expressions:
header$Host IS NOT NULL header$Host IS NULLCookie header name cookie$<name> A cookie name. For example, the expression cookie$My_Cookie_Name='My_Cookie_Value' tests a request to see whether it contains a cookie named My_Cookie_Name with a value of My_Cookie_Value. To test for the presence or absence of a particular cookie, use one of the following expressions:
cookie$MyCookieName IS NOT NULL cookie$MyCookieName IS NULLHTTP method HTTPMethod The HTTP method for the request. Possible values are POST, GET, PUT, and DELETE. Client host clienthost The fully qualified client host name. This value is the Internet Protocol (IP) command host name. This operand does not support numeric operators such as >, >=, <, <=. Client IPV4 clientipv4 The IP address of the client using the Internet Protocol version 4 (IPv4) dotted quad address type n.n.n.n. Client IPV6 clientipv6 The Internet Protocol version 6 (IPv6) 128-bit address type of x:x:x:x:x:x:x:x following Request for Comments 1924 (RFC 1924) of the client computer. Server host serverhost The fully qualified host name of the server. This operand does not support numeric operators such as >, >=, <, <=. Server IPV4 serveripv4 The IP address of the server computer using the IPv4 dotted quad address type n.n.n.n. Server IPV6 serveripv6 The IPv6 128-bit address type ofx:x:x:x:x:x:x:x following RFC 1924 of the server computer. Port port The listening port on which the request was received. Protocol protocol The communications protocol that transmits the request. Currently supported protocols are HTTP, HTTPS, SOAP, and SOAPS. Time time Used to define the date and time of day that a specific request must be honored. Two optional fields are StartTime and EndTime. If a request is received outside of the defined window, the request is not processed. The Start Time and End Time fields each have the following format: dayOfWeek/dayOfMonth/month/year::hour:minute:second.
For example, Thursday, the 11th of April, year 2007 at 1:03:45 PM is specified as:
Thu/11/Apr/2007::13:03:45
Any field can use a wildcard with the value *.
For example, the first of each month is specified as */1.
The dayofWeek values are Sun, Mon, Tue, Wed, Thu, Fri, Sat, and the dayOfMonth values range1-31.
The month value is a non-numeric value that represents the 12 months: Jan, Feb, ar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
The year value is composed of the year's 4 digits. For example, 2007.
The hour value is the hour of day in the 24-hour clock. For example, 8am is represented as::8. The minute and second are integers that range 0-59.
The forward slash (/) is used to separate date parameters, the double colon (::) is used to separate the date parameters, and the colon (:) is used to separate the time of day parameters. The Boolean result of the entire rule in which the time operand is used determines the routing action taken.
Percentage percentage$<val> The percentage operand evaluates to true, a fixed percentage of the time. For example, percentage$50 evaluates to true on average 50% of the time.
Ramp up rampup$<startTime>$<completionTime>
The rampup operand evaluates to true a variable percentage of the time. It always evaluates to false before <startTime> and to true after <completionTime>. As time progresses from <startTime> to <completionTime>, it evaluates to true, a linearly increasing percentage. The format of <startTime> and <completionTime> is day/month/year::hour:min:sec.
where day is the day of the month, month is one of the 12 months: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, year is the four digit year, hour is the two digit hour of the 24 hour clock, min is the two digit value for minute, and sec is the two digit value for minute.For example,
rampup$01/Jan/2007::08:00:00$01/Jan/2007::17:00:00 begins to occasionally evaluate to true at 8 AM on Jan 1, 2007 and always evaluates to true by ramp up completion time at 5 PM of the same day.Depending on the operator chosen, enter a value for the subexpression to create. All operators evaluate to boolean values. Operators are not case-sensitive: AND is equivalent to AnD.
Operator Description Equals Ignore Case (EQUALSIGNORECASE) Equals ignore case operator. The case of the strings is ignored. 'ABC' EQUALSIGNORECASE 'abc' is true. ('ABC' = 'abc') is false. Not Equals (< >) The not equal operator expresses that the operand value is not equal to the value you enter. In (IN)
- For string IN list of strings evaluates to true if the first string exactly matches (case sensitive) the second string. For example:
- 'adrian' in ('keith','eric','kalyan','david', 'adrian and etc') is false.
- 'adrian' in ('tom','adrian') is true.
- 'adrian' in ('Tom','Adrian')is false.
- integer IN list of integers:
- 1 in (1,2,3,4,5) is true.
- 6 in (1,2,3,4,5) is false.
Like (LIKE) Expresses pattern matching for string operand values. The value must contain the wildcard character (%) in the position where the pattern matching is expected to start. For example, the expression:
host LIKE %blancamatches the word blanca and any other word that ends in blanca, while the expression:host LIKE %blancamatches the word blanca and any other word that starts with blanca. The expression:host LIKE %blancamatches the word blanca and any word that has the token blanca embedded in it.Like Ignore Case (LIKEIGNORECASE) This operator expresses pattern matching for string operand values. The case of the strings is ignored. Is Not Null (IS NOT NULL) A validation of the query shows that the requested parameter exists. Concatenate (+) This operator evaluates 'abc'+'def' to 'abcdef'. Like In (LIKEIN) This operator expresses string likein (string1, string2, string3,...) evaluates to true if the string preceding likein matches one or more of the strings (stringN). Is Null (IS NULL) A validation of the query shows that the requested parameter does not exist. Tests for an operand that has a NULL value. Equals ( = ) The equality operator expresses a match in case-sensitive match. Greater Than (>) Evaluates to the standard logical result. Greater Than or Equals (>=) Evaluates to the standard logical result. Less Than (<) Evaluates to the standard logical result. Less Than or Equals (<=) Evaluates to the standard logical result. Between (BETWEEN) Used with AND to select a range of values inclusive of the first (low) value and the last (high) value. Together, they operate on numbers and dates values.
Tasks
- To select your trace specification and log detail level, follow this procedure:
- Select your trace specification and log detail level. In the administrative console, click...
Servers | Server types | Web servers | web_server | Intelligent Management | Trace specification | trace_specification
...to select one of the following log levels:
- EMERG
- ALERT
- CRITICAL
- ERROR
- WARNING
- NOTICE
- INFO
- DEBUG
- OFF
In the specified log sequence, if we select a log level, we enable trace for all preceding log levels. If we do not configure your trace specification, NOTICE logs are recorded by default. We can select multiple specifications. Your selected settings and levels display in the trace window. Multiple specifications are separated by a comma:
control:INFO, control.stateChange:DEBUGIn this example, INFO logs are recorded for the control specification. DEBUG logs are recorded for the specification sequence: control.stateChange.- Click Apply, and the runtime trace on your web server is configured based on your selection.
In the specified log sequence, if we select a log level, we enable trace for all preceding log levels. If we do not configure your trace specification, NOTICE logs are recorded by default. We can select multiple specifications. Your selected settings and levels display in the trace window. Multiple specifications are separated by a comma:
control:INFO, control.stateChange:DEBUGIn this example, INFO logs are recorded for the control specification. DEBUG logs are recorded for the specification sequence: control.stateChange.
- To enter a trace specification rule, follow this procedure:
- Define the trace rule. In the administrative console, click...
Servers > Server types > Web servers > web_server > Intelligent Management > Trace specification. Enter the trace condition in the Edit condition field, or use the Subexpression builder to generate a new expression. Click Syntax help for more information about the trace condition syntax.
- Click Apply. The runtime trace on your web server is now configured based on the new request trace condition.
- To select your request trace specification and log detail level, follow this procedure:
- Select your request trace specification and log detail level. In the administrative console, click...
Servers | Server types | Web servers | web_server | Intelligent Management | Trace specification tree
Click a conditional trace specification to select one of the following log levels:
- EMERG
- ALERT
- CRITICAL
- ERROR
- WARNING
- NOTICE
- INFO
- DEBUG
- OFF
- Click Apply, and the runtime trace on your web server is configured based on your selection.
In the specified log sequence, if we select a log level, we enable trace for all preceding log levels. If we do not configure your trace specification, NOTICE logs are recorded by default. We can select multiple specifications. Your selected settings and levels display in the trace window. Multiple specifications are separated by a comma. Example:
http:INFO, http.request.select.affinity.break:DEBUGIn this example, INFO logs are recorded for the http specification. DEBUG logs are recorded for the specification sequence: http.request.select.affinity.break
We configured tracing on the WebSphere plug-in.
Configure Intelligent Management for web servers Configure Intelligent Management properties for web servers pluginIntelligentManagement.py script Intelligent Management: administrative tasks for web servers Web server plug-in properties