Log file rotations

lnielson

New Member
Joined
Nov 21, 2007
Messages
13
Reaction score
0
Fixed in version 1.1...

I noticed that my /var/log/asterisk/full item was getting quite large and that there was no logfile rotations. Comparing with my old trixbox install, pbx-in-a-flash does not have the log rotations for asterisk (/etc/logrotate.d/asterisk). I copied my old trixbox /etc/logrotate.d/asterisk to the new pbx-in-a-flash box and now I have rotations again. It is a fairly simple rotation file - I am including it here for reference:
Code:
/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
}

/var/log/asterisk/full {
   missingok
   rotate 5
   daily
   create 0640 asterisk asterisk
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
   endscript
}

/var/log/asterisk/cdr-csv/*csv {
  missingok
  rotate 5
  monthly
  create 0640 asterisk asterisk
}

/var/log/atftp.log {
  missingok
  rotate 5
  monthly
  create 0640 nobody nobody
}
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Good point, I'll mark it for inclusion in the next install script

Joe
 

clarocque

New Member
Joined
Nov 17, 2007
Messages
44
Reaction score
0
Is making this mode as simple as:

nano /etc/logrotate.d/asterisk

and pasting the above in to that file?

Chris
 

Members online

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top