Thanks Thomas. How can I maintain a counter per url. In vcl_deliver obj.hits will again give me the overall hits.
On Sat, Apr 30, 2016 at 4:01 PM, Thomas Lecomte < [email protected]> wrote: > On Sat, Apr 30, 2016 at 12:19 PM, Debraj Manna <[email protected]> > wrote: > > Right now we were able to get varnish stats like cache_hit, cache_miss > for > > the overall varnish hits. Is there a way we can get the stats at the url > > level like cache_hit, cache_miss, etc for /discovery/v1/search, > > /discovery/v1/suggest separately? > > Hi, > > Varnish can't do that out of the box. You will have to use std.log() > to log wether the request generated a cache miss or a cache hit, and > then compute the ratio by parsing the output of varnishlog/varnishncsa > (see %{VCL_log:key}x in the varnishncsa manpage). > > -- > Thomas Lecomte / Virtual Expo >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
