# Filebeat Logs rotating filename with data pattern

**URL:** <https://discuss.elastic.co/t/filebeat-logs-rotating-filename-with-data-pattern/267534>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 17, 2021, 2:56pm UTC](https://discuss.elastic.co/t/filebeat-logs-rotating-filename-with-data-pattern/267534 "2021-03-17T14:56:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [March 17, 2021, 2:56pm UTC](https://discuss.elastic.co/t/filebeat-logs-rotating-filename-with-data-pattern/267534/1 "2021-03-17T14:56:42Z")

</div>

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

```auto
logging.files.name: "filebeat-{now/d{yyyy-MM-dd|+01:00}}.log"

```

```auto
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

```

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [March 17, 2021, 5:35pm UTC](https://discuss.elastic.co/t/filebeat-logs-rotating-filename-with-data-pattern/267534/2 "2021-03-17T17:35:45Z")

</div>

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](https://github.com/elastic/beats/issues/24572).

Shaunak

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [March 17, 2021, 5:48pm UTC](https://discuss.elastic.co/t/filebeat-logs-rotating-filename-with-data-pattern/267534/3 "2021-03-17T17:48:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 14, 2021, 7:49pm UTC](https://discuss.elastic.co/t/filebeat-logs-rotating-filename-with-data-pattern/267534/4 "2021-04-14T19:49:12Z")

</div>

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