Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

piping varnishncsa logs into stat logs

Discussion in 'Workarounds and Optimization' started by Miguel G, Nov 12, 2016.

Tags:
  1. Miguel G

    Miguel G Active Member

    Joined:
    Jun 4, 2015
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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?
     
  2. AndreiG6

    AndreiG6 Registered

    Joined:
    Nov 13, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
    #2 AndreiG6, Nov 13, 2016
    Last edited by a moderator: Nov 13, 2016
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page