piping varnishncsa logs into stat logs

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
Spain
cPanel Access Level
Root Administrator
Twitter
I have Varnish 4.1 in front of WHM/Cpanel version 60.

Varnishncsa has the possibility of piping logs into apache access logs.

I found this docs from Cpanel:

The splitlogs Binary - Documentation - cPanel Documentation

but which log do I have to pipe to so I don´t have to add manually every virtualhost that I host in WHM? Can I pipe it to one apache log and after WHM splits into the different access logs that are used by webalizer and awstats?
 

AndreiG6

Registered
Nov 13, 2016
1
0
1
Romania
cPanel Access Level
DataCenter Provider
Hi Miguel & everyone,

After this discussion started yesterday on the Varnish mailing list, I decided to give the integration a go. That being said, the script below will pipe and parse cache hit requests from varnishncsa to splitlogs in what appeared to be the expected format judging by strace. Let me know if you run into any issues, or have some suggestions!

/github.com/AndreiG6/vscp
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello @AndreiG6,

Thank you for taking the time to update this thread with workaround.

Feel free to let us know if you have any additional questions.