# Why logstash generator input generated elasticsearch index size remains constant?

**URL:** <https://discuss.elastic.co/t/why-logstash-generator-input-generated-elasticsearch-index-size-remains-constant/254870>\
**Category:** Logstash\
**Created:** [November 10, 2020, 8:35am UTC](https://discuss.elastic.co/t/why-logstash-generator-input-generated-elasticsearch-index-size-remains-constant/254870 "2020-11-10T08:35:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [November 10, 2020, 8:35am UTC](https://discuss.elastic.co/t/why-logstash-generator-input-generated-elasticsearch-index-size-remains-constant/254870/1 "2020-11-10T08:35:47Z")

</div>

Hi,

I have the latest elastic stack and I am using Logstash's `generator` `input` plugin to generate dummy data and I am pushing it to an elasticsearch index `testindex`. I have ILM policy and template configured for `testindex`, so that every time a message gets pushed, I am expecting the messages to be published to `testindex-000001`, and once the ILM threshold meets, then to `testindex-000002` and so on.

Below is my Logstash configuration;

```
input {
    generator {
        lines => [
            "message 1",
            "message 2",
            "message 3",
            "message 4",
            "message 5"
        ]
        count => 1000
    }
}

filter {
    mutate {
        rename => ["message", "testfield_1"]
    }
}

output {
    elasticsearch {
        hosts => ["127.0.0.1:9200"]
        ilm_rollover_alias => "testindex"
        ilm_pattern => "000001"
        ilm_policy => "testpolicy"
    }
}

```

It creates 5000 messages in a single call, which works as expected. Now, when I call logstash again, still I can see only 5000 messages in my index, while the expected count was previous 5000 + current 5000 = 10000. Why is this happening and how to fix this?

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:** [December 8, 2020, 8:35am UTC](https://discuss.elastic.co/t/why-logstash-generator-input-generated-elasticsearch-index-size-remains-constant/254870/2 "2020-12-08T08:35:51Z")

</div>

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