How can we help you?

How to change the Log Rotation Policy on FreePBX Distro
Posted by: Nicolás Gudiño Posted on: Jun-8th, 2016 19:32

The FreePBX distro has a poor log rotation policy by default. It will rotate the file daily and keep only 30 days worth of data.

That means that if you install any queue stats or metrics package, you will only have 30 days worth of data to analyse. It also means that you won't have the source logs as backups if anything wrong happens to your database.

Our advise is to use a more sensitive log rotation policy: monthly rotation, leaving 36 months worth of data. To change that you have to edit the file


Look at the queue_log section (at the top), and change it to be like this:

/var/log/asterisk/queue_log {
rotate 36
create 0640 asterisk asterisk

Leave the rest of the file as is, with no other modifications but to change "daily" to "monthly" and "rotate 30" to "rotate 36"

Leave a comment