From 6f03a0fd53333e77fbb8cc167ddbdcb0f9ecb76e Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Sat, 30 Jun 2018 20:01:14 +0200 Subject: [PATCH] added logforward.sh --- logforward.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 logforward.sh diff --git a/logforward.sh b/logforward.sh new file mode 100644 index 0000000..695bc43 --- /dev/null +++ b/logforward.sh @@ -0,0 +1,11 @@ +#!/bin/sh +varnishncsa -F '%{X-Forwarded-For}i %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"' | logforward -h backup01.scn.chefkoch.net:22 -p /srv/logfiles_seo/webxx- -u root -k /etc/varnish/id_rsa_lf -b 100000000 + +#!/bin/sh +#trap 'echo oh, I am slain; exit' INT +#while true; do +# DATE=`date +"%Y%m%d%H%M"` +# echo "starting new logfile `hostname`-$DATE" +# ./timelimit -t10800 -T5 varnishncsa -F '%{X-Forwarded-For}i %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"' > log/`hostname`-$DATE.log +# (gzip log/`hostname`-$DATE.log ; scp log/*.gz an@backup01.scn.chefkoch.net:/srv/logfiles_seo ; rm log/*.gz) & +#done