Filebeat Logs rotating filename with data pattern

Hello,

Is there anyway to append a date pattern to Filebeat (or beat in general) to log file
That help sometimes for logs rotating
Something like this may be ?

Thank You

logging.files.name: "filebeat-{now/d{yyyy-MM-dd|+01:00}}.log"
logging.level: info
logging.to_files: true
logging.files:
  path: "${path.home}/logs"
  name: filebeat.log 
  keepfiles: 7
  permissions: 0644
  rotateeverybytes: 10485760 # 10MB
  interval: 24h

This is not possible today. It looks like you are looking for this enhancement: Beats log files should be generated with timestamped filenames · Issue #24572 · elastic/beats · GitHub.

Shaunak

1 Like

By chance, when i put interval: 24h i got filename like

  • filebeat-yyyy-MM-dd-1
  • filebeat-yyyy-MM-dd-2
  • filebeat-yyyy-MM-dd-3
    Wish is fine for me

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