# Logstash 7 is not adding datestamp to index name

**URL:** <https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162>\
**Category:** Logstash\
**Created:** [October 24, 2019, 10:29pm UTC](https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162 "2019-10-24T22:29:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenwdelong](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kenwdelong](https://discuss.elastic.co/u/kenwdelong)\
**Post date:** [October 24, 2019, 10:29pm UTC](https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162/1 "2019-10-24T22:29:01Z")

</div>

I just updated my stack from 6.7.0 -\> 6.8.0 -\> 7.4.0. Everything seems find EXCEPT logstash is putting all the events into an index called "logstash". I used to date-stamp the index, like "logstash-2019-10-24". I cannot figure out why, I've been pulling my hair out for 24 hours on this now.

I run just a single node in a docker container. All my config is here [https://github.com/kenwdelong/elk-docker/tree/ELK-7.4.0](https://github.com/kenwdelong/elk-docker/tree/ELK-7.4.0), I didn't change anything from 6.7.0.

Any help would be appreciated!!!

---

<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:** [October 24, 2019, 11:19pm UTC](https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162/2 "2019-10-24T23:19:32Z")

</div>

It's a guess, but you might be seeing [ILM](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-ilm) in action. Instead of rolling over daily indexes it rolls over every 50 GB or 30 days. The elasticsearch output has options to manage or disable it.

---

<div class="post-metadata">

**Author:** ![kenwdelong](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kenwdelong](https://discuss.elastic.co/u/kenwdelong)\
**Post date:** [October 25, 2019, 12:40am UTC](https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162/3 "2019-10-25T00:40:58Z")

</div>

Thanks for the suggestion. I disabled ILM explicitly in elasticsearch.yml, but to no avail.

However, I did find this:

[2019-10-25T00:35:14,703][WARN][logstash.outputs.elasticsearch][main] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"logstash-2019.10.25", :\_type=\>"\_doc", :routing=\>nil}, #LogStash::Event:0x36e64998], :response=\>{"index"=\>{"\_index"=\>"logstash-2019.10.25", "\_type"=\>"\_doc", "\_id"=\>nil, "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"The [default] mapping cannot be updated on index [logstash-2019.10.25]: defaults mappings are not useful anymore now that indices can have at most one type."}}}}

I'm not sure how to fix this yet but it looks like a clue.

---

<div class="post-metadata">

**Author:** ![kenwdelong](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kenwdelong](https://discuss.elastic.co/u/kenwdelong)\
**Post date:** [October 25, 2019, 3:52pm UTC](https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162/4 "2019-10-25T15:52:01Z")

</div>

I finally figured this out. I had an old template installed called "logstash" which still had the "_defaults_" key in it. Apparently ES 7 could not create the index because of the "_defaults_", so somehow it "fell back" to just "logstash". Also, I had some conflicts where ELK was making assumptions about field types (due to ECS) that broke stuff.

Now I just need to see if I can re-index the data languishing in "logstash" into a proper index...

---

<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:** [November 22, 2019, 3:52pm UTC](https://discuss.elastic.co/t/logstash-7-is-not-adding-datestamp-to-index-name/205162/5 "2019-11-22T15:52:05Z")

</div>

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