HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   log files, rotation and emailing them (http://www.howtoforge.com/forums/showthread.php?t=1400)

hairydog2 25th November 2005 19:48

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.

till 26th November 2005 09:38

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).

falko 26th November 2005 16:41

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.:)

hairydog2 27th November 2005 12:19

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?

till 27th November 2005 12:21

As falko posted above, you will have to change the script /root/ispconfig/scripts/shell/webalizer.php if you want to have another behaviour .

hairydog2 27th November 2005 13:15

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?

hairydog2 30th November 2005 10:59

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?

hairydog2 1st December 2005 12:55

Can't anyone tell me what the correct format for this entry should be?

till 1st December 2005 13:05

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.

hairydog2 1st December 2005 13:27

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.


All times are GMT +2. The time now is 04:49.

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