# Recommendation for date in index name

**URL:** <https://discuss.elastic.co/t/recommendation-for-date-in-index-name/148022>\
**Category:** Logstash\
**Created:** [September 10, 2018, 9:35pm UTC](https://discuss.elastic.co/t/recommendation-for-date-in-index-name/148022 "2018-09-10T21:35:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [September 10, 2018, 9:35pm UTC](https://discuss.elastic.co/t/recommendation-for-date-in-index-name/148022/1 "2018-09-10T21:35:45Z")

</div>

Hi, in logstash I'm currently using the following pattern...

`index => "some-index-name-here_%{+YYYY.MM}"`

I was thinking that I should base the YYYY.MM by parsing the actual log line time instead of using the calculated YYYY.MM from Logstash. Like this if I want to re-index a file it would go into the correct index.

But the issue is that for every other app NOT necessarily the ones I control, the time format is different and thus the pipeline will become cumbersome.

Just wondering how others are approaching this...

---

<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:** [October 8, 2018, 9:35pm UTC](https://discuss.elastic.co/t/recommendation-for-date-in-index-name/148022/2 "2018-10-08T21:35:51Z")

</div>

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