Hello Andrei,

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 varnishncsa

similar to this:

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

is something like this possible?

thanks & greetings
becki



Am 12.11.2016 um 13:30 schrieb Andrei:
Hello,

I suggest looking into splitlogs with piped logging:

http://httpd.apache.org/docs/current/logs.html#piped
https://httpd.apache.org/docs/2.4/programs/split-logfile.html

This is similarly used with cPanel/WHM
(https://documentation.cpanel.net/display/ALD/The+splitlogs+Binary)
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
becki

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc






_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to