Log rotation in filebeat: can I change filebeat log name to filebeat.log as opposed to filebeat?

By default, filebeat log file is named as filebeat, filebeat.1, filebeat.3..
Can we set up the log rotation to be more like java log4j naming convention?
e.g., filebeat.log, filebeat.log.2017-31-08

The reason I am asking this is that our production is mostly a java shop, having all the tools available for java. It has set ups to monitor production logs named as XXXX.log, and XXXX.log.yyyy-mm-dd, deleting older log files to make sure it does not fill up disk spaces.
We would like to be able to leverage this without having to have separate setup for this?
I am wondering How do you guys typically manage filebeat log files to make sure it does not fill up disks?

Filebeat manages its own log rotation. You can specify the base name of the file (e.g. logging.file.name: filebeat.log), but not the suffix applied during rotation. The number of files to keep and the size that triggers rotation are configurable. https://www.elastic.co/guide/en/beats/filebeat/current/configuration-logging.html#_files_rotateeverybytes

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.