AstRecipes » Avoiding queue_log file rotation
If you run a call center, you will definitely want the log rotation susbsystem not to rotate your queue_log file along with the other Asterisk logs found in /var/log/asterisk. The queue_log file contains essential information on how the call-center is going that is being used by software like QueueMetrics
The majority of prebuilt Asterisk distributions will instead lotate that file together with the other Asterisk logs, and this may cause lost data if you do not have a backup. Disabling log rotation
Disabling log rotation is actually quite easy: go to /etc/logrotate.d and look for a file named asterisk. If you run TrixBox, you'll find something like:
/var/log/asterisk/*log {
missingok
rotate 5
weekly
create 0640 asterisk asterisk
postrotate
/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript
}
If your queue_log has already been rotated, you'll want to join the remaining pieces together. That's very easy:
cat queue_log.5 >> queue_log
cat queue_log.4 >> queue_log
cat queue_log.3 >> queue_log
cat queue_log.2 >> queue_log
cat queue_log.1 >> queue_log
cat queue_log.now >> queue_log


