[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

logrotate schluckt gewünschte Konfiguration nicht



Tach zusammen,

habe ein kleines Problem mit Debian sarge.

Ich möchte die Logrotate-Konfiguration angepasst haben, damit mir die Logfiles von Postfix und die Syslog-Infos vom Router nicht täglich rotiert werden, um diese besser auswerten zu können mit diversen Logfile-Analyzern. Ich habe daher die Datei /etc/logrotate.conf angepasst. (siehe unten). Allerdings schert sich das System nicht drum, was ich da eingestellt habe. router.log und mail.log werden trotzdem täglich rotiert (entgegen meiner Konfiguration) und die älteste Logdatei wird mir auch nicht zugemailt, so wie in der Konfig angegeben.

Wenn ich logrotate -d logrotate.conf mache, bekomme ich für diese beiden Dateien folgende Ausgabe:

rotating pattern: /var/log/mail.log  weekly (53 rotations)
empty log files are rotated, old logs mailed to <mailadresse>
considering log /var/log/mail.log
 log does not need rotating

rotating pattern: /home/brickreporter/router.log  monthly (12 rotations)
empty log files are rotated, old logs are removed
considering log /home/brickreporter/router.log
 log does not need rotating

Das heisst für mich eigentlich soviel, dass das eigentlich passen müsste.

Hier der Inhalt von logrotate.conf:

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

# keep 4 weeks worth of backlogs
rotate 4

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

# uncomment this if you want your log files compressed
#compress

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

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

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

# system-specific logs may be configured here

/var/log/mail.log {
       weekly
       rotate 53
       mail <mailadresse>
       compress
       delaycompress
       create 640 root adm
       postrotate
               if [ -f /var/run/amavis/amavis.pid ]; then
               /etc/init.d/amavis restart > /dev/null
       endscript
}


/home/brickreporter/router.log {
       monthly
       compress
       delaycompress
       rotate 12
       create 640 root adm
       postrotate
               /etc/init.d/sysklogd restart > /dev/null
       endscript

}


Hat jemand einen Tip für mich, was da falsch läuft?

Ach ja, hier noch der Inhalt von /etc/crontab:

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    run-parts --report /etc/cron.hourly
0 0 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily 47 0 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly 52 0 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly
#

Danke & Viele Grüße
Thomas


Reply to: