# Data Stream has empty index

**URL:** <https://discuss.elastic.co/t/data-stream-has-empty-index/259292>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, datastreams\
**Created:** [December 21, 2020, 5:02pm UTC](https://discuss.elastic.co/t/data-stream-has-empty-index/259292 "2020-12-21T17:02:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jurilz](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jurilz](https://discuss.elastic.co/u/Jurilz)\
**Post date:** [December 21, 2020, 5:02pm UTC](https://discuss.elastic.co/t/data-stream-has-empty-index/259292/1 "2020-12-21T17:02:10Z")

</div>

Good day,

I'm currently trying to configure and use lifecycle policies for my indices and was following this instruction ([https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-lifecycle-policy.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-lifecycle-policy.html)).

After creating an index template, I get a data stream as intended. My the index template matches the start of the name of my incoming index pattern coming from logstash.

But unfortunately the index of the data stream is empty, i. e. has "docs count: 0".

I'm have no idea where i went wrong and I'm therefor looking forward to any help.

---

<div class="post-metadata">

**Author:** ![andreidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreidan/32/78167_2.png) [@andreidan](https://discuss.elastic.co/u/andreidan)\
**Post date:** [December 22, 2020, 3:18pm UTC](https://discuss.elastic.co/t/data-stream-has-empty-index/259292/2 "2020-12-22T15:18:06Z")

</div>

Thanks for using Elasticsearch, and for your interest in data streams and ILM.

The [set up lifecycle policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-lifecycle-policy.html) guide you followed will set up ILM for a standalone index with an index alias. So I _suspect_ you didn't create a data stream? You can verify this by using the [get data stream](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-data-stream.html) API. However even without the data stream, writting against the configured alias/index should be successful. We'd need more information in order to diagnose this, namely: the [index policy definition](https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-get-lifecycle.html), the [index template matching the target index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html), the index information as returned by [the get index API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html), the [ILM explain output for the index](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html), the request and response you use for indexing documents and/or the logstash configuration

The guide for setting up a data stream with ILM is available [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html)

---

<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 19, 2021, 3:18pm UTC](https://discuss.elastic.co/t/data-stream-has-empty-index/259292/3 "2021-01-19T15:18:13Z")

</div>

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