[Eisfair] LOG-Dateien riesi?==?utf-8?Q?g

Martin Mayer martin at mader.info
Mi Nov 20 10:58:55 CET 2019


Hallo zusammen,

ls -lh /var/www/log zeigt bei mir folgendes:
total 4.8G
-rw-r--r-- 1 root root   41M Nov 20 10:48 access_log
-rw-r--r-- 1 root root  1.8M Nov  4  2016 access_log.1.gz
-rw-r--r-- 1 root root  1.1M Nov 16 23:59 access_log.1.xz
-rw-r--r-- 1 root root  2.3M Aug 28  2016 access_log.10.gz
-rw-r--r-- 1 root root  1.4M Sep 15 23:59 access_log.10.xz
-rw-r--r-- 1 root root  2.1M Oct 23  2016 access_log.2.gz
-rw-r--r-- 1 root root  1.7M Nov 10 23:59 access_log.2.xz
-rw-r--r-- 1 root root  3.0M Oct 17  2016 access_log.3.gz
-rw-r--r-- 1 root root  1.1M Nov  3 00:00 access_log.3.xz
-rw-r--r-- 1 root root  2.1M Oct  9  2016 access_log.4.gz
-rw-r--r-- 1 root root  1.4M Oct 27 23:59 access_log.4.xz
-rw-r--r-- 1 root root 1022K Oct  3  2016 access_log.5.gz
-rw-r--r-- 1 root root  1.3M Oct 19 23:59 access_log.5.xz
-rw-r--r-- 1 root root  1.9M Sep 25  2016 access_log.6.gz
-rw-r--r-- 1 root root  1.7M Oct 13 23:59 access_log.6.xz
-rw-r--r-- 1 root root  2.7M Sep 19  2016 access_log.7.gz
-rw-r--r-- 1 root root 1017K Oct  5 23:59 access_log.7.xz
-rw-r--r-- 1 root root  2.3M Sep 11  2016 access_log.8.gz
-rw-r--r-- 1 root root  1.6M Sep 29 23:59 access_log.8.xz
-rw-r--r-- 1 root root  2.6M Sep  5  2016 access_log.9.gz
-rw-r--r-- 1 root root  1.2M Sep 21 23:59 access_log.9.xz
-rw-r--r-- 1 root root  3.0G Nov 20 10:47 access_log.ssl
-rw-r--r-- 1 root root   281 Nov 17 00:00 error_log
-rw-r--r-- 1 root root   951 Nov  4  2016 error_log.1.gz
-rw-r--r-- 1 root root   344 Nov 11 00:00 error_log.1.xz
-rw-r--r-- 1 root root   403 Aug 28  2016 error_log.10.gz
-rw-r--r-- 1 root root   344 Sep  8 00:00 error_log.10.xz
-rw-r--r-- 1 root root   320 Oct 23  2016 error_log.2.gz
-rw-r--r-- 1 root root   344 Nov  3 00:00 error_log.2.xz
-rw-r--r-- 1 root root   424 Oct 17  2016 error_log.3.gz
-rw-r--r-- 1 root root   352 Oct 28 00:00 error_log.3.xz
-rw-r--r-- 1 root root   399 Oct  9  2016 error_log.4.gz
-rw-r--r-- 1 root root   344 Oct 20 00:00 error_log.4.xz
-rw-r--r-- 1 root root   463 Oct  3  2016 error_log.5.gz
-rw-r--r-- 1 root root   344 Oct 14 00:00 error_log.5.xz
-rw-r--r-- 1 root root   320 Sep 25  2016 error_log.6.gz
-rw-r--r-- 1 root root   344 Oct  6 00:00 error_log.6.xz
-rw-r--r-- 1 root root   648 Sep 19  2016 error_log.7.gz
-rw-r--r-- 1 root root   348 Sep 30 00:00 error_log.7.xz
-rw-r--r-- 1 root root   422 Sep 11  2016 error_log.8.gz
-rw-r--r-- 1 root root   344 Sep 22 00:00 error_log.8.xz
-rw-r--r-- 1 root root   322 Sep  5  2016 error_log.9.gz
-rw-r--r-- 1 root root   344 Sep 16 00:00 error_log.9.xz
-rw-r--r-- 1 root root   54K Nov 17 00:00 error_log.ssl
-rw-r--r-- 1 root root  1.7G Nov 20 10:47 ssl_request_log

Da gibt es drei Probleme:
1) die access_log.ssl wird nach dem rotieren nicht gelöscht
2) es sind noch rotierte daten aus dem Jahr 2016 da
3) die ssl_request_log wird nicht rotiert

die /etc/logrotate.d/apache2 schaut so aus (eigendlich gut)
#---------------------------------------------------------------------
# /etc/logrotate.d/apache2 file generated by
/var/install/config.d/apache2.sh
#
# Do not edit this file, edit /etc/config.d/apache2.sh
# Creation Date: 2016-11-16 17:19:49
#---------------------------------------------------------------------
/var/www/log/access_log /var/www/log/error_log
/var/www/log/access_log.ssl /var/www/log/error_log.ssl
/var/www/log/ssl_request_log {
    weekly
    missingok
    rotate 10
    compress
    delaycompress
    notifempty
    create 640 root nogroup
    sharedscripts
    postrotate
        /etc/init.d/apache2 restart > /dev/null
    endscript
}

es gibt auch noch eine /etc/logrotate.d/apache
#------------------------------------------------------------------
# /etc/logrotate.d/apache file generated by Martin Mayer
#
# Creation Date: 2009-02-22 Time: 22:32
#------------------------------------------------------------------
/var/www/log/access_log /var/www/log/error_log {
    rotate 10
    weekly
    compress
    postrotate
        /etc/init.d/apache2 restart
#        /usr/bin/killall -HUP apache2
    endscript
}

Ich möchte jetzt nicht manuell "unterhalb von eisfair" rummurksen.
Unter setup finde ich aber nichts zu logrotate?

Gruß Martin



Mehr Informationen über die Mailingliste Eisfair