Syntax for piping varnish logs to rotatelogs

Rowan @ Jetboy rowan at jetboy.co.uk
Tue Jun 26 23:46:36 CEST 2012


Thanks Hugo,

I think you've got it there. I've just had a response on Server Fault that
seems to be based around the similar logic:

http://serverfault.com/questions/402157/syntax-for-piping-varnish-logs-to-ro
tatelogs/402506#402506

Am I right in thinking that this is the same limitation that prevents you
passing arguments that contain spaces out from /etc/default/varnish and
/etc/default/varnishncsa? Hacking init files seems like a bad idea, but
there really doesn't seem to be another option. I'll give it a try and post
back.

<snip>

> I'm trying to pipe varnishncsa's logs through Apache's rotatelogs, and 
> running from the shell, things work fine:
>
> sudo varnishncsa -a -P /var/run/varnishncsa/varnishncsa.pid
> |/usr/sbin/rotatelogs /var/log/varnish/varnish.log.%Y%m%d%H 3600
[...]

I don't really know if this is the issue you're running, but maybe it its.
Check this out:

http://my.opera.com/cstrep/blog/2011/11/30/how-to-start-up-varnish-with-a-cu
stom-cc-command-on-debian

I had some problems adding the -F to varnishncsa daemon and it worked.
Attaching the "bash -c" before the start-stop-daemon did the trick.
Maybe the init script is ignoring your parameters for the same reason.

</snip>




More information about the varnish-misc mailing list