Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th November 2005, 19:48
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default log files, rotation and emailing them

I'm bit puzzled about what happens to web server logs after they have been split off and analysed by webalizer.

They seem to get put into a directory for each month, but what happens then? Do they get deleted?

I think I'd like to have some emailed away but i'm not sure where to set this.

This may become a bit of an issue, becasue I notice that one of the sites has managed to collect 50MB of web server log since Monday. Give that a few months and it'll get silly.
Reply With Quote
Sponsored Links
  #2  
Old 26th November 2005, 09:38
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,194
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

The log files where deleted if they get too big. You can set the max. log size in the settings of the site in percent and absolute (MB).
Reply With Quote
  #3  
Old 26th November 2005, 16:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

The deletion of log files is handled at the end of /root/ispconfig/scripts/shell/webalizer.php. So if you don't like the way ISPConfig handles it you can try to tweak that file.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 27th November 2005, 12:19
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Thanks for the information, till and falco.

Is there an easy way to have the logs gz compressed?

Is there an easy way to have them emailed out before they are deleted?
Reply With Quote
  #5  
Old 27th November 2005, 12:21
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,194
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

As falko posted above, you will have to change the script /root/ispconfig/scripts/shell/webalizer.php if you want to have another behaviour .
Reply With Quote
  #6  
Old 27th November 2005, 13:15
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Quote:
Originally Posted by till
As falko posted above, you will have to change the script /root/ispconfig/scripts/shell/webalizer.php if you want to have another behaviour .
You are assuming I know how to change this without messing it up!

What I am looking for is the equivalent of what I have in the logrotate settings on my old server: something like

========================

compress
/www/logs/siteaddress.co.uk-transfer {
daily
rotate 2
mail weblogs@siteaddress.co.uk
}

========================

Can I put something like that in there? If so, how? If not, is there any way to use logrotate to do this?
Reply With Quote
  #7  
Old 30th November 2005, 10:59
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Quote:
Originally Posted by till
The log files where deleted if they get too big. You can set the max. log size in the settings of the site in percent and absolute (MB).
I have a small problem with this: it won't work for me!

Each day I have tried putting one of:
50MB
50
50 MB
and waiting until the next day, but each time the log is way bigger than I have set.

What is the proper format for this setting, and exactly how should it work?
Reply With Quote
  #8  
Old 1st December 2005, 12:55
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Can't anyone tell me what the correct format for this entry should be?
Reply With Quote
  #9  
Old 1st December 2005, 13:05
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,194
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

The problem is that the webfiles have the name of the current month and are written in a directory with the name of the current yrear. I dont know if logrotate supports that. Maybe you can use the symlink "web.log" that points to the current web logfile for logrotate, bu i guess you will get problems when you use two logrotation mechanisms together.
Reply With Quote
  #10  
Old 1st December 2005, 13:27
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
 
Default

Sorry, I wasn't asking clearly enough.

All I want to know is what to put in the field of ISPConfig to replace the default 30% so that it is a hard limit of 50MB.

I can worry about logrotate at a later date.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.