# Index template settings disappear

**URL:** <https://discuss.elastic.co/t/index-template-settings-disappear/381914>\
**Category:** Kibana\
**Created:** [September 12, 2025, 7:19pm UTC](https://discuss.elastic.co/t/index-template-settings-disappear/381914 "2025-09-12T19:19:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![juancamiloll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juancamiloll/32/110326_2.png) [@juancamiloll](https://discuss.elastic.co/u/juancamiloll)\
**Post date:** [September 12, 2025, 7:19pm UTC](https://discuss.elastic.co/t/index-template-settings-disappear/381914/1 "2025-09-12T19:19:40Z")

</div>

Hello,

When I monitor the status of the datastream configuration, I have sometimes noticed that the configuration I have assigned (3 shards and 1 replica) disappears, and I have to add this index template again.

I don't know why it sometimes disappears from one moment to the next. Has this happened to you? How have you solved it? What do you suggest?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/a/fa5077b7871683332f37307c806d544f330f5d87.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/4/442c0d609ed2f8305f22158be48e244009436045.png)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 12, 2025, 9:59pm UTC](https://discuss.elastic.co/t/index-template-settings-disappear/381914/2 "2025-09-12T21:59:54Z")

</div>

You need to add the settings in the `@custom` component template, if you edit the index template of an integration to add a different component template, it will be overriden when the integration is updated.

The correct way is to make any custom settings/mappings using the `@custom` component template.

---

<div class="post-metadata">

**Author:** ![Rafa\_Silva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafa_silva/32/147814_2.png) [@Rafa\_Silva](https://discuss.elastic.co/u/Rafa_Silva)\
**Post date:** [September 13, 2025, 12:24am UTC](https://discuss.elastic.co/t/index-template-settings-disappear/381914/3 "2025-09-13T00:24:14Z")

</div>

This usually happens because Fleet-managed templates override custom ones. Any manual template you add can be replaced when the integration updates. The safest way is to create a higher-priority component template (with only the shard/replica settings) and attach it, or define those settings directly in an ILM policy. That way Fleet won’t wipe your changes.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 13, 2025, 1:36pm UTC](https://discuss.elastic.co/t/index-template-settings-disappear/381914/4 "2025-09-13T13:36:06Z")

</div>

I'll play tiebreaker here...

1. If you're using an integration which it looks like you are you should follow @leandrojmp suggestion.  
Put in your settings in the `@custom` template is the correct thing to do as it allow for upgrades in the integration package without overriding your settings

2. If you're not using an integration and you want to create your own data stream then you should follow what @Rafa_Silva is suggesting. By the way I would argue you would just clone the base logs template and follow the same pattern. I gave an example of this [here](https://discuss.elastic.co/t/custom-filestream-integration-adding-mappings/381316/5)

It seems for your current case I would go with option 1.
