# Weekly Index Delete Automatically from Elasticsearch Cluster

**URL:** <https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552>\
**Category:** Elasticsearch\
**Created:** [November 22, 2022, 1:28pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552 "2022-11-22T13:28:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dharminfadia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dharminfadia/32/119587_2.png) [@dharminfadia](https://discuss.elastic.co/u/dharminfadia)\
**Post date:** [November 22, 2022, 1:28pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/1 "2022-11-22T13:28:09Z")

</div>

Hello Guys

I am using Elasticsearch 7.10.2 I have 6 Data node Cluster in this Cluster I am Facing Space Issue so I set Index Policy for Daily Index but I am having Monthly and Weekly Index I want setup Automatically Delete Weekly Index and Monthly Index Can you Please Help me for this

**My Current Configuration for Index Automatic Daily Index Delete**

PUT \_opendistro/\_ism/policies/delete\_debug\_logs\_after\_15days  
{  
"policy": {  
"description": "Delete debug indices after 15 days",  
"default\_state": "Open",  
"schema\_version": 1,  
"states": [  
{  
"name": "Open",  
"actions": [  
{  
"open": {}  
}  
],  
"transitions": [  
{  
"state\_name": "Delete",  
"conditions": {  
"min\_index\_age": "15d"  
}  
}  
]  
},  
{  
"name": "Delete",  
"actions": [  
{  
"delete": {}  
}  
]  
}  
],  
"ism\_template": {  
"index\_patterns": ["security-auditlog\*"],  
"priority": 100  
}  
}  
}  
}

POST \_opendistro/\_ism/add/security-auditlog\*  
{  
"policy\_id": "delete\_debug\_logs\_after\_15days"  
}

---

<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:** [November 22, 2022, 1:28pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/2 "2022-11-22T13:28:10Z")

</div>

Elasticsearch 7.10 is [EOL](https://www.elastic.co/support/eol) and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<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:** [November 22, 2022, 1:32pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/3 "2022-11-22T13:32:08Z")

</div>

> [@dharminfadia](#):
>
> PUT \_opendistro/\_ism/policies/delete\_debug\_logs\_after\_15days

You are using Opendistro/Opensearch, which is not supported here, you need to ask this in the Opensearch forum.

---

<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:** [November 22, 2022, 1:32pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/4 "2022-11-22T13:32:08Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![dharminfadia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dharminfadia/32/119587_2.png) [@dharminfadia](https://discuss.elastic.co/u/dharminfadia)\
**Post date:** [November 22, 2022, 1:45pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/5 "2022-11-22T13:45:05Z")

</div>

@leandrojmp Thank you for Reply

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 22, 2022, 2:36pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/6 "2022-11-22T14:36:02Z")

</div>

Yeah. Or even better, switch to the real Elasticsearch project 😉

---

<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:** [December 20, 2022, 2:36pm UTC](https://discuss.elastic.co/t/weekly-index-delete-automatically-from-elasticsearch-cluster/319552/7 "2022-12-20T14:36:38Z")

</div>

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