Again: Log Rotate Issues

Version 3.2.3-8

The /var/log/asterisk/full only contains data from one day, there are no other compressed files.

Old log rotate:

# cat /etc/logrotate.d/asterisk.rpmnew

/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
        daily
        rotate 2
        size 5G
        missingok
        notifempty
        sharedscripts
        create 0640 asterisk asterisk
        su asterisk asterisk
        postrotate
                /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
        endscript
}

/var/spool/mail/asterisk {
...

New log rotate

# cat /etc/logrotate.d/asterisk

/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
        daily
        rotate 7
        missingok
        compress
        delaycompress
        notifempty
        sharedscripts
        create 0640 asterisk asterisk
        su asterisk asterisk
        postrotate
                /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
        endscript
}

/var/log/asterisk/full {
        daily
        rotate 7
        missingok
        compress
        delaycompress
        notifempty
        sharedscripts
        create 0640 asterisk asterisk
        su asterisk asterisk
        postrotate
                /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
        endscript
}

So two things.

  1. In the new file it looks like the /var/log/asterisk/full section has the same exact settings as the first section (messages, event_logs etc). Why does it need an individual section?
  2. Why is the asterisk.rpmnew present? I am afraid that it causes a conflict… I deleted it from the server now, I’ll only know tomorrow if that was indeed the issue.

Thanks

1 Like