How to filter Varnish logs based on XID?

Posted by Martijn Heemels on Server Fault See other posts from Server Fault or by Martijn Heemels
Published on 2011-11-14T15:14:11Z Indexed on 2011/11/14 17:54 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

I'm running into infrequent 503 errors which appear hard to pinpoint. Varnishlog is driving me mad, since I can't seem to get the information I want out of it.

I'd like to see both the client- and backend-communications as seen by Varnish. I thought the XID number, which is logged on Varnish's default error page, would allow me to filter the exact request out of the logging buffer. However, no combination of varnishlog parameters gives me the output I need.

The following only shows the client-side communication:

varnishlog -d -c -m ReqStart:1427305652

while this only shows the resulting backend communication:

varnishlog -d -b -m TxHeader:1427305652

Is there a one-liner to show the entire request?

© Server Fault or respective owner

Related posts about linux

Related posts about logging