Varnishtop - rank top "user-agent" when condition met

2 posts / 0 new
Last post
Gavin Fowler
Varnishtop - rank top "user-agent" when condition met


I'm trying to expand my use of varnislog from displaying most popular user-agent (from TxHeader) i.e:

varnishtop -C -b -i TxHeader -I "user-agent"

returns (example):

3.88 TxHeader User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +
1.83 TxHeader User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

To displaying the most popular "user-agent" when another condition is met, for example: when TxHeader "X-Is-Crawler: true" is matched. So, I've tried the following statement, but I don't belive the results I'm getting (result should only show user agents when header condition X-Is-Crawler is true)

varnishtop -C -b -i TxHeader -I "(X-Is-Crawler: true|user-agent)"

I guess my question is, is this type of query possible using varnishtop? if so any pointers on syntax to use? BTW: Using varnishlog (obvioulsy this doesn't give me the most popular) the syntax would be:

varnishlog -C -b -m TxHeader:user-agent -m TxHeader:"X-Is-Crawler: true" | grep -i "user-agent"

Many thanks




No. This is not possible. 

Varnish Software