Sample Header Ad - 728x90

Logrotate for freeradius accounting logs

1 vote
1 answer
179 views
I have this config for log detail: /opt/freeradius/logs/*/detail { daily rotate 4 compress delaycompress missingok notifempty create 0640 root root sharedscripts maxsize 500M postrotate /bin/systemctl reload freeradius > /dev/null 2>/dev/null || true endscript } I have these olds logs with new logs : [root@freeradius01 192.168.17.10]# pwd /opt/freeradius/logs/192.168.17.10 [root@freeradius01 192.168.17.10]# ll total 56919724 -rwxrwxrwx 1 root root 21048752215 Aug 14 23:59 detail-20240814 -rwxrwxrwx 1 root root 21617187765 Aug 15 23:59 detail-20240815 -rwxrwxrwx 1 root root 5988044800 Aug 16 23:59 detail-20240816 -rwxrwxrwx 1 root root 5947392 Sep 25 23:59 detail-20240925 -rwxrwxrwx 1 root root 7478423552 Oct 21 23:59 detail-20241021 -rwxrwxrwx 1 root root 1907452140 Oct 22 11:19 detail-20241022 [root@freeradius01 192.168.17.10]# When running logrotate manually and forced with verbos I have this result: [root@freeradius01 192.168.17.10]# /usr/sbin/logrotate -v -f /etc/logrotate.d/radiusd reading config file /etc/logrotate.d/radiusd Reading state from file: /var/lib/logrotate/logrotate.status Allocating hash table for state file, size 64 entries Creating new state Creating new state Creating new state .. .. Creating new state Handling logs rotating pattern: /opt/freeradius/logs/*/detail forced from command line (4 rotations) empty log files are not rotated, log files >= 524288000 are rotated earlier, old logs are removed considering log /opt/freeradius/logs/*/detail not running postrotate script, since no logs were rotated [root@freeradius01 192.168.17.10]# ll total 56919724 -rwxrwxrwx 1 root root 21048752215 Aug 14 23:59 detail-20240814 -rwxrwxrwx 1 root root 21617187765 Aug 15 23:59 detail-20240815 -rwxrwxrwx 1 root root 5988044800 Aug 16 23:59 detail-20240816 -rwxrwxrwx 1 root root 5947392 Sep 25 23:59 detail-20240925 -rwxrwxrwx 1 root root 7478423552 Oct 21 23:59 detail-20241021 -rwxrwxrwx 1 root root 1968389637 Oct 22 11:22 detail-20241022 [root@freeradius01 192.168.17.10]# grep "detail" /var/lib/logrotate/logrotate.status "/var/log/radius/radacct/*/detail" 2024-3-5-3:0:0 "/opt/freeradius/logs/*/detail" 2024-3-5-3:0:0 [root@freeradius01 192.168.17.10]# date Tue Oct 22 11:22:45 WAT 2024 [root@freeradius01 192.168.17.10]# **So the log rotation not running despite I runned it manually / also old logs not compressed!!?**
Asked by tmedtcom (485 rep)
Oct 22, 2024, 10:29 AM
Last activity: Oct 23, 2024, 05:09 PM