A10 Web Logging
A10 Web Logging
Caching
This section describes ACOS support of logging to external servers over TCP.
Overview 907
906
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
Overview
ACOS supports web logging for HTTP virtual ports, which can be used with HTTP load bal-
ancing or RAM caching. Web logging for load-balanced HTTP servers provides data about cli-
ent access to servers. Web logging for RAM caching provides information about client access
to content cached on the ACOS device. Web logging to external log servers is supported over
TCP and UDP. Logging over TCP is applicable to web logging for HTTP virtual ports. The rest
of this section describes this use of the feature.
Web logs generated by the ACOS device use the following format:
Client-Src-IP -- Timestamp-on-ACOS-device Request-info Payload-length
Referer-info User-agent Virtual-server-name:Virtual-port
Here is an example:
20.20.20.23 - - Mon Apr 23 23:38:13 2012 "GET / HTTP/1.0" 177
"-" "Wget/1.12 (linux-gnu)" vs:80
This example uses a default log string. See Web Log String Customization for instructions on
configuring custom log strings.
1. Configure real servers for each log server. Add all ports receiving log messages to these
configurations.
2. Add the log servers to a service group. Use round-robin load-balancing (the default
method).
3. (Optional – TCP Ports only) Configure TCP-proxy templates to customize TCP settings
for connections between the ACOS device and log servers.
907
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
For example, a TCP-Proxy template can be used to enable keepalive probes that ensure
TCP connections with log servers remain established during idle periods between logs.
(See CLI example.)
4. Configure a logging template. Add the service group containing the log servers to the
template. Add the TCP-Proxy template to the service group as required.
5. To log web traffic sent to load-balanced HTTP servers, create an HTTP template and add
the logging template to it.
6. To log web traffic served from the ACOS device’s local RAM cache, create a RAM Cach-
ing template and add the logging template to it.
7. On the VIP, add the HTTP or RAM Caching template (or both) to the HTTP virtual port.
GUI Configuration
This section describes the GUI steps related to logging templates. The configuration steps for
the real servers, service groups, and VIPs are the same as without use of logging templates.
908
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
5. Select the logging template from the drop-down list in the Logging Template field.
6. Click OK.
CLI Configuration
To configure a logging template, use the slb template logging command to change the CLI
to the configuration level for the template, where the service-group command is available to
specify the name of the service group that contains the log servers.
This template tcp-proxy command specifies the name of the TCP-proxy template to use for
managing TCP sessions between the ACOS device and the log servers.
Use the template logging command at the configuration level for the HTTP template:
Use the template logging command at the configuration level for the RAM Caching tem-
plate:
The following commands configure web logging for an IPv4 virtual port and an IPv6 virtual
port. On each virtual port, web logging is enabled both for HTTP load-balanced client-server
traffic and for client access to content that is cached in the ACOS device's RAM cache.
909
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
In this example, two real servers are used as HTTP content servers and as logging servers. Cli-
ents send requests for HTTP content to port 80. ACOS either serves the requested from the
local RAM cache, if available, or sends the request to one of the servers.
In this example, the ACOS device uses the same servers as the content servers and as the log-
ging servers. Client requests for HTTP content are sent to port 80. Log traffic is sent to one of
the following ports:
l 4999 – TCP port listening for log traffic sent over IPv4.
l 5999 – TCP port listening for log traffic sent over IPv6.
These commands configure service groups for the logging and application servers accessed
by clients:
ACOS(config)# slb service-group logsg tcp
ACOS(config-slb svc group)# member rs 80
ACOS(config-slb svc group-member:80)# exit
ACOS(config-slb svc group)# exit
ACOS(config)# slb service-group udpsg udp
ACOS(config-slb svc group)# member rs 5140
ACOS(config-slb svc group-member:5140)# exit
ACOS(config-slb svc group)# exit
ACOS(config)# slb service-group v6logsg tcp
ACOS(config-slb svc group)# member rs6 80
ACOS(config-slb svc group-member:80)# exit
910
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
The following commands configure the TCP-proxy template, to enable keepalive probes:
ACOS(config)# slb template tcp-proxy logtcp
ACOS(config-TCP proxy template)# keepalive-probes 4
ACOS(config-TCP proxy template)# exit
911
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
These commands configure the VIPs. The configuration of the snat and snat6 NAT pool ref-
erenced in the example is not included.
ACOS(config)# slb virtual-server vs 20.20.20.25
ACOS(config-slb vserver)# port 80 http
ACOS(config-slb vserver-vport)# source-nat pool snat
ACOS(config-slb vserver-vport)# service-group logsg
ACOS(config-slb vserver-vport)# template http loghttp
ACOS(config-slb vserver-vport)# template cache logcache
ACOS(config-slb vserver-vport)# exit
ACOS(config-slb vserver)# exit
ACOS(config)# slb virtual-server vs6 2020::2025
ACOS(config-slb vserver)# port 80 http
ACOS(config-slb vserver-vport)# source-nat pool snat6
ACOS(config-slb vserver-vport)# service-group v6logsg
ACOS(config-slb vserver-vport)# template http loghttp6
ACOS(config-slb vserver-vport)# template cache logcache6
ACOS(config-slb vserver-vport)# exit
ACOS(config-slb vserver)# exit
The CLI can modify web logging formats with the format command at the logging template
configuration level. The logging template bound to the virtual server constructs log messages
for HTTP/HTTPS requests according to the specified format.
912
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
In this log message, Feb 1 19:30:53 is the timestamp of when the log was received. The IP
address of the server that received the log is 11.0.0.40. The remaining content of the log
message is constructed according to the format string (defined by the format command that
is configured within the logging template).
913
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
%Y – year
%m – month
%d – day
%H – hour
%M – minute
%S – seconds
914
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
l \\r – Tab
The log message breaks at <unsupported “B”>, displaying only content associated with <sup-
ported “A”>.
For example, given the logging format “%P%A%a%p”, “%P” is not supported and as a result noth-
ing is parsed into a log message.
915
ACOS 5.2.1-P3 Application Delivery Controller Guide
Chapter 58: Web Logging for HTTP and RAM Caching Feedback
For the logging format “%p%P%a%A”, the content after the unsupported “%P” format character
is not included in the log message and the information for “%p” is the only content parsed into
a log message.
To view which characters are parsed in a format string, use the show slb template logging
command.
Do not use the question mark (?) as a literal character for log messages.
GUI Configuration
CLI Configuration
This example shows how to use the format command to create a log format, then use the
show slb template logging command to verify the configuration:
ACOS(config)# slb template logging v-log
ACOS(config-logging)# format %a \n "%a"
ACOS(config-logging)# show slb template logging
slb template logging v-log
format %a \n "%a"
ACOS(config-logging)#
916