[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]]
https://github.com/varnish/Varnish-
Cache/blob/1628f0b93e4ba725f2f26ca82a6e794229517475/lib/libvarnishapi/vsl_query.c#L148
But, VNUM does not care a string of multiple field. (ex: - Timestamp
Resp: 1453185650.045902 0.000848 0.000031 )[[BR]]
https://github.com/varnish/Varnish-
Cache/blob/c24650d0f19faaa2f9c629c9d79ccebb940f585b/lib/libvarnish/vnum.c#L104-L105
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