I’ve had asterisk running on centos for about a couple weeks now testing its stability to use in a production server in the near future. What I’m finding is the log file full is generating about 2 mb of data every day with little traffic on the server itself which seems to be an quite abit as far as I’m concerned, especially when the full file just keeps getting bigger and bigger now about 40 mb to date
Also the event_log generates a new event_log file ever day with no data. I’m thinking that the full file is suppose to dump the daily input into the event_log but not to sure about that.
Any ideas
look at /etc/asterisk/logger.conf and set your logging preferences. also, how many full.x (where x is a number) files are you seeing ?
Only one full file is there and where should be one for each day as I’ve seen on other systems I also noticed that the other log files are also having the same problem and not generating daily logs I’m thinking that logger.conf is just for what to log full => notice,warning,error,debug,verbose not relating to when to start a new log file. My other logs are also have the same problem now that I’ve looked into this deeper
Would this be a cron problem?
if your other logs aren’t being rotated weekly, then it would point to a cron/logrotate issue. is there a cron entry for logrotate ? and is /etc/logrotate.conf setup correctly ? does it include /etc/logrotate.d ?
next would be to see if you have an entry in /etc/logrotate.d for asterisk.
Looks like the problem is within logrotate.d/asterisk which you indicated and has also resolved another issue which I have not addressed but has been now resolved. I compared the file with another asterisk installation, and here are the differences
before
/var/log/asterisk/messages /var/log/asterisk/*log {
create 0640 asterisk asterisk
daily
extension .txt
mail root@localhost
missingok
nocompress
notifempty
rotate 32
sharedscripts
size 10M
postrotate
/usr/sbin/asterisk -rx 'logger reload'
/dev/null 2>/dev/null || true
endscript
}
/var/log/asterisk/cdr-csv/*csv
/var/log/asterisk/cdr-custom/*csv {
create 0640 asterisk asterisk
monthly
extension .txt
mail root@localhost
missingok
nocompress
notifempty
rotate 2
sharedscripts
size 10M
postrotate
/usr/sbin/asterisk -rx 'logger reload'
/dev/null 2>/dev/null || true
endscript
}
After
/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
}
Not sure why /var/log/asterisk/messages for console messages I think correct me if I’m wrong but for the full log problem it clear that there is no entry to rotate daily as indicated in the after logrotate.d/asterisk when I compared the two file
I’m new to asterisk and thanks for leading me to this logging issue
This is a great app
well I guess this didn’t solve the problem as the ful log and the *csv is still filling up and not rotating like logrotate.d/astrisk suggests
any ideas?
we’ve got a worse one, where the log generates errors and starts spitting out logs that are 2GIG+ in size, locking the computer up. Is this a problem in logger? Perhaps asterisk logs too much?
It does appear to me that asterisk does some self-tests, which might explain why the log would continue to grow in size.