Cloud Platform

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 infrastructure.

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
  • 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.
  • The forwarded Varnish logs in the JSON format do not contain the query field.

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]",
   "status":"304",
   "bytes":"0",
   "method":"GET",
   "host":"website.example.com",
   "url":"/path/to/page",
   "referrer":"-",
   "user_agent":"Browser Name Here",
   "client_ip":"10.0.1.3",
   "time_firstbyte":"0.000241",
   "hitmiss":"hit",
   "handling":"hit",
   "forwarded_for":"10.0.1.3, 127.255.255.255",
   "request_id":"v-00000000-ffff-1111-aaaa-111111111111",
   "ah_log":"",
   "ah_application_id":"bbbbbbbb-3333-4444-9999-bbbbbbbbbbbb",
   "ah_environment":"prod",
   "ah_trace_id":"ZZZZZZZZZZZZZZ"
 }

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

KeyValue
timeThe date and time of the request in HTTP date/time format (%d/%b/%Y:%T %z).
statusThe HTTP status sent to the client. Production environments don’t display full information for HTTP 5xx status codes.
bytesThe size of the response in bytes, excluding HTTP headers.
methodThe method of the request (usually GET or POST).
hostThe host name of the request.
urlThe full path of the requested file.
referrerThe referrer for this request, if any.
user_agentThe full user-agent for this request.
client_ipThe originating IP address of the request.
time_firstbyteTime from when the request processing starts until the first byte is sent to the client, in seconds.
hitmissWhether the request was a cache HIT or MISS. PIPE and PASS are considered misses.
handlingHow the request was handled: cache HIT, MISS, PIPE, PASS or ERROR.
forwarded_for

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_idA 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_logLog name identifier. Not required, and not always set.
ah_application_idThe UUID (Universal Unique Identifier) of the application serving this request.
ah_environmentThe name of the Cloud Platform environment serving this request.
ah_trace_idThis value is for Acquia internal use only.

More information

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Acquia Help

Filter by product:

Cloud Platform common questions