[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Webalizer - logrotate - missing days
- Subject: Re: [cobalt-users] Webalizer - logrotate - missing days
- From: "Jelmer Jellema" <cobalt@xxxxxxxxxxxxxxx>
- Date: Thu Feb 28 11:24:24 2002
- Organization: Spin in het Web (www.spininhetweb.nl)
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> For a long time I've notice that sites are missing days but now I have a
> larger site that never gets processed. I've narrowed this down to the
> logfile being rotated away before Webalizer gets ahold of it. I could
just
> make the threshold for logrotate a lot higher but it would still get
> rotated away every so often.
>
> Has anyone found a good solution for this? I've searched the archives
here
> and found someone who suggested manually doing this for sites that I care
> to know about.
>
> It seems like the problem is that Webalizer and logrotate are run in the
> same daily cron cycle simultaneously at 4:02 am. I would just run
> logrotate an hour later but I'm not sure whether logrotate needs to be run
> to split the logfiles first.
>
1. move the webalizer.pl script out of the cron.daily or where is it to
somewhere else
2. Change /etc/logrotate.d/apache to add the script in the access prerotate
, after split_logs, like:
/var/log/httpd/access {
prerotate
/usr/local/sbin/split_logs web < /var/log/httpd/access
/usr/local/myscripts/webalizer.pl <== **added**
endscript
missingok
postrotate
/usr/bin/killall -HUP httpd 2> /dev/null || true
endscript
daily
}
This way it will run after the new vsite logs have been created, but before
they are gzipped by logrotate.
Hope this helps, Jelmer
-----------------------------------------------------------------
Jelmer Jellema - Spin in het Web
www.spininhetweb.nl
Spin in het Web: Alle Touwtjes In Handen
-----------------------------------------------------------------
Spin in het Web is de producent van:
www.visinhetnet.nl: Niet Het Laatste Nieuws