Logging

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jul 10 21:09:47 CEST 2006


In message <1398.193.213.34.102.1152557632.squirrel at denise.vg.no>, "Anders Berg
" writes:

>>... possibly
>> also the received headers may not really be of any interested
>> in the general case.
>
>Actually that one could be useful in production. Lets say you get swamped
>by a bot and wanna stop it, User-Agent would help alot in a case like
>that.

That's not the kind of scenario I meant with "the general case" :-)

For situations like that, I expect us to have a log-tailer that
gives a top(1) like display of whatever we have selected.

I should add here I envision a generic set of arguments to logtailers
which the libvarnishapi should handle for programs:

	-i tag[,tag...] -- include these tags
	-x tag[,tag...] -- exclude these tags

		If no -i option is given a '-i all' is implict.

	-I regexp -- only data matching regexp
	-X regexp -- exclude data matching regexp

	-C match regexps case-insensitive

So for this case your you present, the command would be:

	varnish-top -i header -C -I user-agent

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list