175
Appendix D
Configuration Files
Example
The following is an example of a
LogFormat
specification collecting information using three common fields:
<LogFormat>
<Name = "minimal"/>
<Format = "%<chi> : %<cqu> : %<pssc>"/>
</LogFormat>
The following is an example of a
LogFormat
specification using aggregate operators:
<LogFormat>
<Name = "summary"/>
<Format = "%<LAST(cqts)> : %<COUNT(*)> : %<SUM(psql)>"/>
<Interval = "10"/>
</LogFormat>
The following is an example of a
LogFilter
that will cause only
REFRESH_HIT
entries to be logged:
<LogFilter>
<Name = "only_refresh_hits"/>
<Action = "ACCEPT"/>
<Condition = "%<pssc> MATCH REFRESH_HIT"/>
</LogFilter>
The following is an example of a
LogObject
specification that creates a local log file for the minimal format
defined earlier. The log file name will be
minimal.log
because this is an ASCII log file (the default).
<LogObject>
<Format = "minimal"/>
<Filename = "minimal"/>
</LogObject>
The following is an example of a
LogObject
specification that includes only HTTP requests served by hosts
in the domain
company.com
or by the specific server
server.somewhere.com
. Log entries are sent to port
4000 of the collation host
logs.company.com
, and to port 5000 of the collation host 209.131.52.129:
<LogObject>
<Format = "minimal"/>
<Filename = "minimal"/>
<ServerHosts = "company.com,server.somewhere.com"/>
<Protocols = "http"/>
<CollationHosts = "logs.company.com:4000,209.131.52.129:5000"/>
</LogObject>
WELF (WebTrends Enhanced Log Format)
Traffic Server supports WELF, the WebTrends Enhanced Log format, so that you can analyze Traffic Server
log files with WebTrends reporting tools. A predefined
<LogFormat>
that is compatible with WELF is
provided at the end of the
logs.config
file (shown below). To create a WELF format log file, create a
<LogObject>
that uses this predefined format.
NOTE
When specifying the field in the filter condition, you can omit the
%<>
. This means that
the following filter is equivalent to the example directly above:
<LogFilter>
<Name = "only_refresh_hits"/>
<Action = "ACCEPT"/>
<Condition = "pssc MATCH REFRESH_HIT"/>
</LogFilter>