Syslog-ng com destino mysql - aumenta a retenção de log

1

Eu tenho esse syslog-ng 3.1.3 empoeirado que grava em um banco de dados e tudo está funcionando bem, no entanto, parece manter apenas 30 dias de registros (a última tabela é logs20150826 ) Como posso aumentar isso? Não vejo nada imediatamente claro na documentação.

Existem algumas referências em logrotate dirs, mas nada que pareça estar controlando o destino mysql e nada em /etc/syslog-ng/syslog-ng.conf , então essa retenção de 30 dias deve ser algum tipo de padrão.

    
por Recct 25.09.2015 / 13:24

1 resposta

2

Verifique se você tem o php-syslog-ng instalado, o syslog-ng não é responsável por isso.

Log rotation

Log rotation should be part of most installations where you use php-syslog-ng. It is better to use log rotation than deleting rows in the main table because deleting rows can lead to performance problems. Rotating old logs out of the main table will also usually result in better performance because the tables with old logs are static and can be optimized. There is a logrotate.php script in the scripts directory. You may have to edit it to enter the correct path to your php-syslog-ng installation but after that it should be ready for use. If you enable merge tables in the config.php file then a merge table of all log tables will be created at the end of the script. The merge table will allow you to search across all tables instead of having to do searches against one table at a time. The merge table does equate to a slight performance hit on the search form because the fields are populated based on all tables instead of one particular table.

You can also specify enable the LOGRETENTION setting in config.php. If you enable this then logs older than this setting will be dropped whenever the logrotate.php is run.

If you decide to use the logrotate.php script then just add it to your crontab and have it run however frequent you want (max is currently one time per day).

Fonte link

    
por 25.09.2015 / 14:16