# Output file to create based on timestamp

**URL:** <https://discuss.elastic.co/t/output-file-to-create-based-on-timestamp/150880>\
**Category:** Logstash\
**Created:** [October 3, 2018, 12:07pm UTC](https://discuss.elastic.co/t/output-file-to-create-based-on-timestamp/150880 "2018-10-03T12:07:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [October 4, 2018, 12:02pm UTC](https://discuss.elastic.co/t/output-file-to-create-based-on-timestamp/150880/2 "2018-10-04T12:02:19Z")

</div>

I've looked at this before as well and the closest thing I could find was this:

> [@\[Solved\] Weekly indexes instead of daily](https://discuss.elastic.co/t/solved-weekly-indexes-instead-of-daily/56871):
>
> Right now I am working with indexes that are created daily using the following output in my config file: output { elasticsearch { hosts =\> ["localhost:9200"] index =\> "logstash-events-%{+YYYY.MM.dd}" } } This is fine, but I was wondering if it is possible to have it make new indexes every week.

---

_[View the full topic](https://discuss.elastic.co/t/output-file-to-create-based-on-timestamp/150880)._
