EdgeRouter - How can I adjust log sizes and number stored on EdgeRouter?

Answer


EdgeRouter is automatically set up for rotating logs. The output below indicates the default setting is to store 10 log files, rotated at 1000k:

ubnt@ubnt# cat /etc/logrotate.d/messages
/var/log/messages {
 missingok
 notifempty
 rotate 10
 size=1000k
 postrotate
 invoke-rc.d rsyslog reload >/dev/null
 endscript
}
[edit]

Note: It is recommended to use a remote syslog server in a mission critical deployment for reasons of redundancy and efficiency.

You can also change the values above with the following command:

ubnt@ubnt# set system syslog global archive ?
Possible completions:
 filesNumber of saved files
 sizeSize of log files (kbytes)
[edit]