[Varnish] #1845: VSL-query can only capture last field, if using floats operand.

Varnish varnish-bugs at varnish-cache.org
Tue Jan 19 10:40:14 CET 2016

#1845: VSL-query can only capture last field, if using floats operand.
 Reporter:  xcir         |       Type:  defect
   Status:  new          |   Priority:  normal
Milestone:               |  Component:  varnishlog
  Version:  4.1.1-beta1  |   Severity:  normal
 Keywords:  vsl-query    |
 VSL-query was using the VNUM when vsl-query parse the float.[[BR]]


 But, VNUM does not care a string of multiple field. (ex: -   Timestamp
 Resp: 1453185650.045902 0.000848 0.000031 )[[BR]]


 Therefore, vsl-query can only capture last field.

 '''Unpatched(not have output)'''
 [root at ws01 httpd]# varnishlog -q "timestamp:resp[2] > 0." -graw
 ^C[root at ws01 httpd]#

 '''Patched(value is floats)'''
 xcir at varnish-trunk:~$ sudo  /opt/varnish-411/bin/varnishlog -q
 "timestamp:resp[2] > 0." -graw
      32776 Timestamp      c Resp: 1453194103.565767 0.001798 0.000025
 ^Cxcir at varnish-trunk:~$

 '''Patched(value is not floats/not have output)'''
 xcir at varnish-trunk:~sudo  /opt/varnish-411/bin/varnishlog -q
 "respheader:b" -graw
          2 RespHeader     c B: 2.427602foo 4.001516bar 6.000027mage
 ^Cxcir at varnish-trunk:~$ sudo  /opt/varnish-411/bin/varnishlog -q
 "respheader:b[1] > 0" -graw
 ^Cxcir at varnish-trunk:~$

Ticket URL: <https://www.varnish-cache.org/trac/ticket/1845>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list