For each machine running Varnish:
- Add the following line to /etc/rc.local:
$ varnishncsa -a -w /var/log/varnish/access.log -D -P /var/run/varnishncsa.pid
- Configure log rotation by adding the following line to
$ /etc/logrotate.d/varnish
(create it if it doesn't exist):/var/log/varnish/*log { create 640 http log compress postrotate /bin/kill -USR1 `cat /var/run/varnishncsa.pid 2>/dev/null` 2> /dev/null || true endscript }
- Add a local file source to your collector pointing to the path(/var/log/varnish/*.log) defined above
Comments
0 comments
Please sign in to leave a comment.