ClearFoundation Tracker - ClearOS
View Issue Details
0001713ClearOSapp-base - Base Systempublic2014-05-23 15:282020-01-13 04:41
dloper 
 
lowfeaturealways
closedsuspended 
7.0.0 Alpha 2 
 
0001713: Change log file names between apache, webconfig, squid, and dansguardian...possibly others.
Enterprise-grade logging requires log files to have unique names for archive purposes. These are often stored in flat directories which would cause a conflict between the name 'access.log' in various services. While we store them in different directories, upstream 7, by default, will archive to the same central directory. Their reason for their change is to allow archived data to be NFS mounted to permanent storage.

To avoid issues and unnecessary hacks that will require large maintenance, we should merely change the names of log files in version 7 and avoid the issue all together.

While we could use a relative directory for 'olddir' it will be more scalable to specify an absolute path so as to be able to use more robust logging techniques.

ALSO! note the change to XZ compression. If we have reports running out of archives, we will need to tune the reporting engine to be able to handle reading this data (ie. zcat and zgrep need to be changed to xzgrep and xzcat respectively).
This example is very close to what will be done in version 7:

# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 52 weeks worth of backlogs
rotate 52

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# use xz for compression
compresscmd /usr/bin/xz
uncompresscmd /usr/bin/unxz
compressext .xz
compressoptions -9e

# store archives in /var/log/archive
olddir /var/log/archive

# uncomment this if you want your log files compressed
compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
    minsize 1M
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0600 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.
No tags attached.
Issue History
2014-05-23 15:28dloperNew Issue
2014-05-23 15:34user2Statusnew => confirmed
2020-01-13 04:41NickHNote Added: 0012681
2020-01-13 04:41NickHStatusconfirmed => closed
2020-01-13 04:41NickHResolutionopen => suspended

Notes
(0012681)
NickH   
2020-01-13 04:41   
Migrated to https://gitlab.com/clearos/clearfoundation/app-base/issues/33 [^]