Information for: DEVELOPERS   PARTNERS

Varnish request logs

The Varnish® request log displays in JSON format the requests processed by Varnish, regardless of their caching status. Most subscribers use shared load balancers. Varnish logs are available only to subscriptions with dedicated balancers using the Streaming log entries in real time feature. You cannot download Varnish request logs from either the Cloud Platform interface or your servers.

For a list of the log files handled by Cloud Platform, including accessing these log files, log file retention, and their locations, see About Cloud Platform logging.

Note for log streaming users

Acquia’s log forwarding feature adds information to the beginning of each line that is forwarded to an external service. For more information, see File formats in forwarded log files.

Parsing the log file

The following line is a representative example of the data written into your website’s Varnish request log, with line breaks included for ease of reading:

   "time":"[12/Dec/2018:23:59:59 +0000]",
   "user_agent":"Browser Name Here",

Each of the items in the Varnish request log is noted in the following table, along with its description:

Key Value
time The date and time of the request in HTTP date/time format (%d/%b/%Y:%T %z).
status The HTTP status sent to the client. Production environments don’t display full information for HTTP 5xx status codes.
bytes The size of the response in bytes, excluding HTTP headers.
method The method of the request (usually GET or POST).
host The host name of the request.
url The full path of the requested file.
referrer The referrer for this request, if any.
user_agent The full user-agent for this request.
client_ip The originating IP address of the request.
time_firstbyte Time from when the request processing starts until the first byte is sent to the client, in seconds.
hitmiss Whether the request was a cache HIT or MISS. PIPE and PASS are considered misses.
handling How the request was handled: cache HIT, MISS, PIPE, PASS or ERROR.

The full set of IP addresses tracked as “requester IP,” which will contain the IP addresses of the following if they are in use by the subscription:

  • Load balancer
  • ELB (Elastic Load Balancer)
  • Content Delivery Networks or Web Application Firewalls (WAFs) such as Edge)
request_id A unique ID attached to this request by the load balancer, which appears in several Cloud Platform log files. For more information, see Using HTTP request IDs.
ah_log Log name identifier. Not required, and not always set.
ah_application_id The UUID (Universal Unique Identifier) of the application serving this request.
ah_environment The name of the Cloud Platform environment serving this request.
ah_trace_id This value is for Acquia internal use only.