PDA

View Full Version : Question about apache logging



evil_smurf
03-30-2006, 09:54 PM
I have set the cron job that makes directadmin tally disk and bw usage to run every hour instead of every 24 hours.

@hourly echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue


the reason being is because I find that waiting 24 hours to tally up disk and bw usage for accounts seems to be a little on the long-wait side.


Anyway, as such I have an unliked side effect. The apache logs for the domains are cleared every hour as well.

Is there a way to make the apache logs clear every 24 hours instead of every hour yet still get the correct bw and disk usage tally's every hour, or, have the logs log to the current domain.log files, as well as log to the global access_log (preferred)?

jldurham6
11-20-2006, 08:51 AM
I just noticed this too. I have mine doing the same thing but never noticed it on my lighly used domains. I'd also like to know if there is a way around this.

nobaloney
11-20-2006, 11:48 AM
I believe it would require quite a bit of rewriting. The tallying reets the logs because the logs are where the numbers come from for the tally.

Jeff

DirectAdmin Support
11-20-2006, 11:42 PM
Hello,

Use this guide:
http://www.directadmin.com/features.php?id=507

set:

rotation=0

in your directadmn.conf.
You would then be responsible for doing the rotation whenever you wish.

webalizer=1
can stay, note that the larger the logs are (if you don't rotate them) the longer webalizer takes to find it's last spot where it left off.

John

nobaloney
11-21-2006, 10:43 AM
Wow, that was easy :).

I guess I was wrong.

How would we do the rotation then?

Configuring logrotate?

Jeff

DirectAdmin Support
11-21-2006, 10:46 AM
Logroate would be easiest, yes... assuming it knows how to do wildcards. Note that DA will still handle the ".bytes" file, so don't rotate that in logrotate.

John