Varnish Newbie Logging Question

Jorge Díaz jdzstz at
Tue Jul 27 23:00:30 CEST 2010


We are using in production Varnish 2.1.2 in Solaris 10 machine.

To dump logs we are using "varnishncsa" and "rotatelogs" program from our
Apache Web server instalation:

*varnishncsa -P ${HOME}/varnish/conf/
|${HOME}/srv_httpd/bin/rotatelogs -l
${HOME}/varnish/logs/acc_%Y%m%d_%H%M%S.log 3600*

varnishncsa is started at same time that varnishd as Solaris service.

We rotate logs once every hour (we have a lot of requests) outside we have a
machine with Apache+Awstat with a crontab script that retrieves logs with

2010/7/27 Rob Szarka <szlists at>

> Hi, folks! I'm new to Varnish, but already loving it. :) Having decided to
> deploy it for real, I need to get logging set up properly. My aim is to get
> the data from my Varnish servers back to my stats server in Apache common
> log format so I can crunch the data there.
> 1. Does anyone have example scripts to share?
> 2. I am assuming that taking periodic dumps of new entries from the memory
> log just isn't feasible, and thus running either varnishlog or varnishncsa
> as a daemon is the way to go, right?
> 3. If I'm going to write logs to disk on the varnish server before
> transferring them off to my stats server, will it make a significant
> difference whether I use varnishncsa directly vs. using varnishlog and then
> translating the logs with varnishncsa once they get to my stats server?
> 4. I assume that I need to start the varnishlog or varnishncsa daemon after
> I start varnishd. Is that why the -d switch is there? To catch any entries
> that sneak in between startup of the two processes?
> Thanks for your help,
> Rob
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list