# How to change the policy of an existing datastream

**URL:** <https://discuss.elastic.co/t/how-to-change-the-policy-of-an-existing-datastream/373811>\
**Category:** Kibana\
**Created:** [January 29, 2025, 11:00am UTC](https://discuss.elastic.co/t/how-to-change-the-policy-of-an-existing-datastream/373811 "2025-01-29T11:00:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [January 29, 2025, 2:52pm UTC](https://discuss.elastic.co/t/how-to-change-the-policy-of-an-existing-datastream/373811/3 "2025-01-29T14:52:29Z")

</div>

Hi @ataylor Welcome to the community

Perhaps take a look at this

> **[Tutorials: Customize data retention policies | Fleet and Elastic Agent Guide...](https://www.elastic.co/guide/en/fleet/current/data-streams-ilm-tutorial.html)**

I think I provided some instructions here as well

> [@\[BIG-IP ASM\] Could not index event to Elasticsearch](https://discuss.elastic.co/t/big-ip-asm-could-not-index-event-to-elasticsearch/373465/8):
>
> See here how to customize ILM for a data stream... Basically Clone the existing Policy and Edit to your liking and give it a name... like logs-custom Add a custom template you can do through the UI or this is the whole request in Kibana - Dev Tools PUT \_component\_template/logs@custom { "template": { "settings": { "index": { "lifecycle": { "name": "logs-custom" } } } } } If you are going to use agents... you must use data streams If you wan…

---

_[View the full topic](https://discuss.elastic.co/t/how-to-change-the-policy-of-an-existing-datastream/373811)._
