<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks much, Geoff.<div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Best Regards,<br class="">Danila</div>
</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On 10 Apr 2017, at 16:36, Geoff Simmons <<a href="mailto:geoff@uplex.de" class="">geoff@uplex.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 04/10/2017 03:18 PM, Danila Vershinin wrote:<br class=""><blockquote type="cite" class=""><br class="">Say I have stumbled upon a "Backend Fetch Failed” page and that<br class="">gives me an XID.<br class=""><br class="">How do I easily query varnishlog for corresponding client and<br class="">backend requests?<br class=""><br class="">varnishlog -q “XID = 12345” doesn’t work<br class=""></blockquote><br class="">It can be done you're running Varnish 5.1:<br class=""><br class=""><a href="https://www.varnish-cache.org/docs/5.1/whats-new/changes-5.1.html#vxid-in-vsl-queries" class="">https://www.varnish-cache.org/docs/5.1/whats-new/changes-5.1.html#vxid-in-vsl-queries</a><br class=""><br class="">The left-hand side is named 'vxid', and remember to use '==' as the<br class="">comparison operator ('=' is an error):<br class=""><br class="">$ varnishlog -q “vxid == 12345”<br class=""><br class="">In versions prior to 5.1 you can use the X-Varnish header:<br class=""><br class=""># client side<br class="">varnishlog -d -q 'RespHeader:X-Varnish[1] == 12345'<br class=""><br class=""># backend side<br class="">varnishlog -d -q 'BereqHeader:X-Varnish == 12345'<br class=""><br class=""><br class="">HTH,<br class="">Geoff<br class="">-- <br class="">** * * UPLEX - Nils Goroll Systemoptimierung<br class=""><br class="">Scheffelstraße 32<br class="">22301 Hamburg<br class=""><br class="">Tel +49 40 2880 5731<br class="">Mob +49 176 636 90917<br class="">Fax +49 40 42949753<br class=""><br class="">http://uplex.de<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>