Varnishlog. Get entries by XID
Geoff Simmons
geoff at uplex.de
Mon Apr 10 15:36:49 CEST 2017
On 04/10/2017 03:18 PM, Danila Vershinin wrote:
>
> Say I have stumbled upon a "Backend Fetch Failed” page and that
> gives me an XID.
>
> How do I easily query varnishlog for corresponding client and
> backend requests?
>
> varnishlog -q “XID = 12345” doesn’t work
It can be done you're running Varnish 5.1:
https://www.varnish-cache.org/docs/5.1/whats-new/changes-5.1.html#vxid-in-vsl-queries
The left-hand side is named 'vxid', and remember to use '==' as the
comparison operator ('=' is an error):
$ varnishlog -q “vxid == 12345”
In versions prior to 5.1 you can use the X-Varnish header:
# client side
varnishlog -d -q 'RespHeader:X-Varnish[1] == 12345'
# backend side
varnishlog -d -q 'BereqHeader:X-Varnish == 12345'
HTH,
Geoff
--
** * * UPLEX - Nils Goroll Systemoptimierung
Scheffelstraße 32
22301 Hamburg
Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753
http://uplex.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20170410/dbc1abe3/attachment.pgp>
More information about the varnish-misc
mailing list