# Create a max of 7 monitoring indices

**URL:** https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603
**Category:** Elasticsearch
**Created:** [September 22, 2023, 8:06am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603 "2023-09-22T08:06:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)
#### Post date: [September 22, 2023, 8:06am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603/1 "2023-09-22T08:06:00Z")

</div>

Hello,

I want to configure monitoring setting as such that only 7 days monitoring indices is created in my cluster in order to monitor for only 7 days and not more..

Also Is there a way that only 1 elasticsearch monitoring index is created once a week or month?? I dont dont want daily creation of monitoring index.

---

<div class="post-metadata">

### Author: ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)
#### Post date: [September 22, 2023, 8:09am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603/2 "2023-09-22T08:09:09Z")

</div>

Hi Rakhshunda,

You can configure index lifecycle management (ILM) policies to automatically manage indices according to your performance, resiliency, and retention requirements. For example, you could use ILM to:

- Spin up a new index when an index reaches a certain size or number of documents  
\*\*\* Create a new index each day, week, or month and archive previous ones\*\*
- Delete stale indices to enforce data retention standards

[https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)

Regards

---

<div class="post-metadata">

### Author: ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)
#### Post date: [September 22, 2023, 8:16am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603/3 "2023-09-22T08:16:45Z")

</div>

.monitoring indices is not maintaining any alias or template. so I cannot attach an ILM policy to .monitoring indices..

---

<div class="post-metadata">

### Author: ![miltonhultgren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miltonhultgren/32/100401_2.png) [@miltonhultgren](https://discuss.elastic.co/u/miltonhultgren)
#### Post date: [September 22, 2023, 8:27am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603/4 "2023-09-22T08:27:59Z")

</div>

The `.monitoring-*` indices do indeed have templates, but they are System templates so they are hidden by default in the UI.

 ![Screenshot 2023-09-22 at 10.27.04](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d7e3b02bb18b82dfaeffbaf046c4bf104bad5a4.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 22, 2023, 11:56am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603/5 "2023-09-22T11:56:24Z")

</div>

> [@Rakhshunda\_Noorein\_J](#):
>
> .monitoring indices is not maintaining any alias or template. so I cannot attach an ILM policy to .monitoring indices..

You do not need to attach any policy as one already exists.

It is called `.monitoring-8-ilm-policy`, you need to edit this policy to delete after 7 days.

---

<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: [October 20, 2023, 11:57am UTC](https://discuss.elastic.co/t/create-a-max-of-7-monitoring-indices/343603/6 "2023-10-20T11:57:01Z")

</div>

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