Excluding url's from varnishhist

Paul Dowman lists at pauldowman.com
Wed Oct 14 22:49:20 CEST 2009


On Thu, Oct 8, 2009 at 4:59 AM, Rob S <rtshilston at gmail.com> wrote:

> Tollef Fog Heen wrote:
> > ]] Paul Dowman
> >
> > | Hi,
> > | I'm having trouble figuring out how to exclude certain URL's from
> > | varnishhist. I want to exclude static files, e.g. urls that match a
> pattern
> > | like /\.png|\.gif|\.js|\.css|\.ico/ (because these don't cause much
> load on
> > | the back-end, I want to see only the requests that would hit my app
> > | servers).
> > |
> > | I know about the -X regex argument, but it doesn't seem to do what I
> want.
> > | Actually I don't really understand what it does, the man page says that
> it
> > | excludes "log entries" that match a pattern, but as far as I can tell
> it
> > | doesn't match URL's.
> > |
> > | What's the right way to do this?
> >
> > There's currently no way to do this, I'm afraid.  varnishtop -b -i TxURL
> > gives you the URLs, but not any timing information.
> >
> I realise it'd produce slightly different information, but you could
> create a separate backend director for files that match this regex, then
> look at varnishncsa for those particular backends...


Thanks for the suggestion, I'll consider that.

varnishlog has everything I need to know (request time and hit/miss), just
not all on one line, so I think what I'll do is write a little script that
converts the multi-line varnishlog output into a single line with the few
things that I want to see (URL, response time and hit/miss).

I'll share that if/when I get around to doing it in case it's useful for
anyone else.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20091014/c4059c6f/attachment-0001.html>


More information about the varnish-misc mailing list