# Exporting to constant index name with Filebeat

**URL:** <https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 19, 2021, 7:11pm UTC](https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906 "2021-02-19T19:11:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Estes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_estes/32/64928_2.png) [@Tim\_Estes](https://discuss.elastic.co/u/Tim_Estes)\
**Post date:** [February 19, 2021, 7:11pm UTC](https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906/1 "2021-02-19T19:11:22Z")

</div>

From the [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/change-index-name.html) on changing the name of the index that filebeat writes to:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/5/1569462e421758157ff083c845be624c514050a2.png)

But I was wondering if it would be possible to have filebeat write to an index name that doesn't change:

```auto
output.elasticsearch.index: "my-custom-index"
setup.template.name": "my-custom-index"
setup.template.pattern": "my-custom-index"

```

Would this work? Would there be any adverse consequences of doing this?  
I've tried setting these fields in my filebeat.yml, but the output is still being written to the `filebeat-7.11.1*` indexes...

If I can get this to work, I plan on hooking that index into a data stream.

---

<div class="post-metadata">

**Author:** ![Tim\_Estes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_estes/32/64928_2.png) [@Tim\_Estes](https://discuss.elastic.co/u/Tim_Estes)\
**Post date:** [February 19, 2021, 7:28pm UTC](https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906/2 "2021-02-19T19:28:42Z")

</div>

I figured out how to do it:

simply add `setup.ilm.enabled: false` to filebeat.yml and it will start writing to whatever index you say!

---

<div class="post-metadata">

**Author:** ![RLPowellJr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rlpowelljr/32/97049_2.png) [@RLPowellJr](https://discuss.elastic.co/u/RLPowellJr)\
**Post date:** [February 19, 2021, 7:30pm UTC](https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906/3 "2021-02-19T19:30:14Z")

</div>

After the ilm.enabled change you'll find it most definitely does work. You may need to manually set up index lifecycle management if you're wanting to use it, but otherwise I'm not sure there's any significant adverse consequences.

---

<div class="post-metadata">

**Author:** ![Tim\_Estes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_estes/32/64928_2.png) [@Tim\_Estes](https://discuss.elastic.co/u/Tim_Estes)\
**Post date:** [February 19, 2021, 7:30pm UTC](https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906/4 "2021-02-19T19:30:55Z")

</div>

Thanks! Yes, I plan on setting up an index template that has the ILM policies in place.

---

<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:** [March 19, 2021, 9:31pm UTC](https://discuss.elastic.co/t/exporting-to-constant-index-name-with-filebeat/264906/5 "2021-03-19T21:31:35Z")

</div>

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