varnishncsa logs split per domain
admin at beckspaced.com
Sat Nov 12 16:38:18 CET 2016
thanks a lot for your reply and thoughts ...
perhaps I used the wrong words in the subject?
I'm actually not looking to split a varnish logfile into different
domains and log files ...
instead I was looking to create single log files for each domain with
similar to this:
varnishncsa -q "ReqHost ~ '^mydomain.com$' " -a -w
varnishncsa -q "ReqHost ~ '^myotherdomain.com$' " -a -w
is something like this possible?
thanks & greetings
Am 12.11.2016 um 13:30 schrieb Andrei:
> I suggest looking into splitlogs with piped logging:
> This is similarly used with cPanel/WHM
> which you can likely pipe to directly from varnishncsa granted the
> expected format is used. I haven't tried this personally, but now that
> you've mentioned it this would seem pretty useful. Hope this helps!
> On 11/12/2016 12:52 PM, Admin Beckspaced wrote:
>> hello there ;)
>> since putting varnish version 5 in front of my apache backend the
>> apache access logs don't fill up and webalizer has no data to process.
>> I know that I can use varnishncsa to create logs in apache format.
>> but since I'm using multiple domains I would need logs per domain.
>> I see that there's the -q <query> option
>> I found stuff by google like:
>> varnishncsa -m "RxHeader:^Host: www.domain1.com$" -a -w
>> /var/log/varnish/www.domain1.com -D
>> but I see that the -m param is no longer available in version 5?
>> how could i use that -q <query> param so varnishncsa would produce
>> different logs for different domains?
>> would a regex query on the host like below be possible?
>> varnishncsa -q "ReqHost ~ '^mydomain.com$' " -a -w
>> /var/log/varnish/mydomain.com -D
>> varnishncsa -q "ReqHost ~ '^myotherdomain.com$' " -a -w
>> /var/log/varnish/myotherdomain.com -D
>> where can I find a list of variables I can use in the vsl-query language?
>> a RTFM with the proper link would be perfect ;)
>> thanks & greetings
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
More information about the varnish-misc