# Date stamp in index name is being ignored

**URL:** <https://discuss.elastic.co/t/date-stamp-in-index-name-is-being-ignored/212532>\
**Category:** Logstash\
**Created:** [December 19, 2019, 5:22pm UTC](https://discuss.elastic.co/t/date-stamp-in-index-name-is-being-ignored/212532 "2019-12-19T17:22:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrue](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rrue](https://discuss.elastic.co/u/rrue)\
**Post date:** [December 19, 2019, 5:22pm UTC](https://discuss.elastic.co/t/date-stamp-in-index-name-is-being-ignored/212532/1 "2019-12-19T17:22:36Z")

</div>

I'm upgrading to ELK 7.5 and finding a lot of things have changed since 5.5 (no kidding).

In particular I can't seem to make logstash write to an ES index named for the current date. When testing with a very simple logstash config file that I believe should write to an index named logstash-YYYY.MM.dd, instead it creates an index called "logstash" Besides this messing with my existing maintenance scripts, my index template is looking for "logstash-\*" so the index created has the wrong settings.

the output stanza of logstash.conf:  
output {

```
elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "logstash-%{+YYYY.MM.dd}"
}

```

}

Grateful for any guidance...

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 19, 2019, 7:15pm UTC](https://discuss.elastic.co/t/date-stamp-in-index-name-is-being-ignored/212532/2 "2019-12-19T19:15:14Z")

</div>

You are seeing [ILM](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-ilm) in action.

---

<div class="post-metadata">

**Author:** ![rrue](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rrue](https://discuss.elastic.co/u/rrue)\
**Post date:** [December 19, 2019, 11:09pm UTC](https://discuss.elastic.co/t/date-stamp-in-index-name-is-being-ignored/212532/3 "2019-12-19T23:09:49Z")

</div>

Doh. I was even already trying to disable ILM but in the index template, which wasn't being applied because the "logstash" name doesn't fit the "logstash-\*" wildcard the template was looking for.

Disabled ILM in elasticsearch.yml and all is well.

Thanks!

---

<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:** [January 16, 2020, 11:09pm UTC](https://discuss.elastic.co/t/date-stamp-in-index-name-is-being-ignored/212532/4 "2020-01-16T23:09:51Z")

</div>

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