Comments on Splitting Apache Logs With vlogger
Splitting Apache Logs With vlogger Vlogger is a little tool with which you can write Apache logs broken down by virtual hosts and days. With vlogger, we need to put just one CustomLog directive into our global Apache configuration, and it will write access logs for each virtual host and day. Therefore, you do not have to split Apache's overall access log into access logs for each virtual host each day, and you do not have to configure Apache to write one access log per virtual host (which could make you run out of file descriptors very fast).
1 Comment(s)
Comments
Nice script. Tried it with my server, which uses the access log format of:
01202011-10:56:46-access.log
Which means the for loop should be rewritten like this
(Note the diroectory names for each vhost differ to yours and the ls -F etc will produce names like /var/log/apache2/admin.example.info:443)
for directory in `ls -F|grep \/|awk -F/ '{print $1}'`; do if [ -d ${directory} ]; then /usr/bin/webalizer -c ${webalizerconf} -n ${directory} -s ${directory} -r ${directory} -q -T -o /www/admin/webalizer/${directory}/web/stats ${logdir}/${directory}/${yesterdaysdate}-??:??:??-access.log; fi; done
??:??:?? is a valid shell expansion, but fails in the script because it does not expand it. I think this is a problem with Webanaliser.