# How to Implement ILM on a Fixed Index?

**URL:** https://discuss.elastic.co/t/how-to-implement-ilm-on-a-fixed-index/351493
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [January 21, 2024, 5:45am UTC](https://discuss.elastic.co/t/how-to-implement-ilm-on-a-fixed-index/351493 "2024-01-21T05:45:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vnajUWni](https://avatars.discourse-cdn.com/v4/letter/v/2bfe46/32.png) [@vnajUWni](https://discuss.elastic.co/u/vnajUWni)
#### Post date: [January 21, 2024, 5:45am UTC](https://discuss.elastic.co/t/how-to-implement-ilm-on-a-fixed-index/351493/1 "2024-01-21T05:45:41Z")

</div>

I am currently using the elasticsearch-logger plugin from APISIX ([GitHub - apache/apisix: The Cloud-Native API Gateway](https://github.com/apache/apisix)) to write logs to Elasticsearch. However, this plugin does not support creating new index by date and can only use a fixed value, like "apisix\_log". In addition, the plugin writes to an alias named "apisix". I have searched extensively online and even consulted ChatGPT 4, but have yet to resolve my issue. Therefore, I'm turning to the [discuss.elastic.co](http://discuss.elastic.co) community for assistance. How should I implement ILM in this situation?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [January 21, 2024, 8:49am UTC](https://discuss.elastic.co/t/how-to-implement-ilm-on-a-fixed-index/351493/2 "2024-01-21T08:49:04Z")

</div>

I would recommend you [create a rollover index](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-rollover.html) with a write alias named `apisix`. Your plugin will index into this write alias and you then set up ILM to rollover the index and delete old indices.

---

<div class="post-metadata">

### Author: ![vnajUWni](https://avatars.discourse-cdn.com/v4/letter/v/2bfe46/32.png) [@vnajUWni](https://discuss.elastic.co/u/vnajUWni)
#### Post date: [January 21, 2024, 12:12pm UTC](https://discuss.elastic.co/t/how-to-implement-ilm-on-a-fixed-index/351493/4 "2024-01-21T12:12:07Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> I would recommend you [create a rollover index](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-rollover.html) with a write alias named `apisix`. Your plugin will index into this write alias and you then set up ILM to rollover the index and delete old indices.

Thank you for your response. I was able to solve the problem based on your suggestions.

---

<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: [February 18, 2024, 12:12pm UTC](https://discuss.elastic.co/t/how-to-implement-ilm-on-a-fixed-index/351493/5 "2024-02-18T12:12:52Z")

</div>

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