• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Issue Logrotate not working for some files

uniauto

Basic Pleskian
Server operating system version
Debian 12.6
Plesk version and microupdate number
Plesk Obsidian 18.0.62
Hi.

I noticed some log files are not rotating.
Example:
/var/log/daemon.log
/var/log/fail2ban.log
/var/log/syslog
/var/log/plesk/httpsd_access_log

After checking config file, /opt/psa/etc/logrotate.conf
Code:
allowhardlink

include /opt/psa/etc/logrotate.d


/var/log/plesk/xferlog.processed {
        missingok
        rotate 24
        monthly
        maxsize    200M
        compress
        nocreate
}

/var/log/maillog.processed {
        missingok
        rotate 24
        monthly
        maxsize    200M
        compress
        nocreate
}

/opt/psa/var/webalizer.cache {
    missingok
    rotate  0
    size    512M
    nocreate
}

I think it missing "include /etc/logrotate.d", because /etc/logrotate.d contains settings for logs that are not rotating
Code:
# ls /etc/logrotate.d/
alternatives  apt   drweb-update  fail2ban         mariadb       nginx      plesk        plesk-php83  sw-cp-server  syslog-ng
apache2       dpkg  drwebd        httpd-prerotate  mod_security  passenger  plesk-php82  ppp          sw-engine     unattended-upgrades
 
Hello, @uniauto. The log files listed in /etc/logrotate.d are processed by the system logrotate. Generally, if logs are not used in statistics generation, they are rotated via ‘system’ logrotate rather than the Plesk's logrorate utility. /opt/psa/etc/logrotate.conf (DEB-based) is where log files handled by Plesk's logrorate utility are defined.
Debian 12 use journalctl and logrotate are not installed by default.
Since /etc/logrotate.d constains plesk related log, maybe plesk should install logrotage or manage it using psa-logrotate, because system default arent doing anything and some logs became big.
 
Debian 12 use journalctl and logrotate are not installed by default.
Since /etc/logrotate.d constains plesk related log, maybe plesk should install logrotage or manage it using psa-logrotate, because system default arent doing anything and some logs became big.
The best solution in this particular case will be to consider installing the logrotate package:

apt install logrotate
 
Back
Top