# ISM policy remove all indeces even if I set min time

**URL:** <https://forum.opensearch.org/t/ism-policy-remove-all-indeces-even-if-i-set-min-time/12488>\
**Category:** OpenSearch\
**Created:** [February 13, 2023, 2:26pm UTC](https://forum.opensearch.org/t/ism-policy-remove-all-indeces-even-if-i-set-min-time/12488 "2023-02-13T14:26:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.emrekaraman](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@a.emrekaraman](https://forum.opensearch.org/u/a.emrekaraman)\
**Post date:** [February 13, 2023, 2:26pm UTC](https://forum.opensearch.org/t/ism-policy-remove-all-indeces-even-if-i-set-min-time/12488/1 "2023-02-13T14:26:15Z")

</div>

Hi Team,

I set ISM policy to remove 3 day old indeces but polict removed all of the indeces without looking time of creation of indeces. I used ISM template like filebeat-tmb\*

naming is like below;  
filebeat-tmbtstweb01-7.12.1-2023.02.11  
filebeat-tmbtstweb01-7.12.1-2023.02.12  
filebeat-tmbtstweb01-7.12.1-2023.02.13 etc…

my ISM config;  
{  
“id”: “t”,  
“seqNo”: 1396,  
“primaryTerm”: 1,  
“policy”: {  
“policy\_id”: “t”,  
“description”: “test”,  
“last\_updated\_time”: 1676296630643,  
“schema\_version”: 17,  
“error\_notification”: null,  
“default\_state”: “close”,  
“states”: [  
{  
“name”: “close”,  
“actions”: [  
{  
“retry”: {  
“count”: 3,  
“backoff”: “exponential”,  
“delay”: “1m”  
},  
“close”: {}  
}  
],  
“transitions”: [  
{  
“state\_name”: “delete”,  
“conditions”: {  
“min\_index\_age”: “3d”  
}  
}  
]  
},  
{  
“name”: “delete”,  
“actions”: [  
{  
“retry”: {  
“count”: 3,  
“backoff”: “exponential”,  
“delay”: “1m”  
},  
“delete”: {}  
}  
],  
“transitions”:   
}  
],  
“ism\_template”: [  
{  
“index\_patterns”: [  
“filebeat-tmb\*”  
],  
“priority”: 100,  
“last\_updated\_time”: 1650450452750  
}  
]  
}  
}

---

<div class="post-metadata">

**Author:** ![a.emrekaraman](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@a.emrekaraman](https://forum.opensearch.org/u/a.emrekaraman)\
**Post date:** [February 14, 2023, 11:17am UTC](https://forum.opensearch.org/t/ism-policy-remove-all-indeces-even-if-i-set-min-time/12488/2 "2023-02-14T11:17:34Z")

</div>

Hi Team,

I created new policy but again it remove all indeces without looking index creation time. I checked system indeces about polict. Polict can detect index creation time correctly but still removing without look that. I just want to remove 3 days old indeces after closing them.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/8/80386452ab38b308f794f1cbd501c43f4a93dbb7.png)

---

<div class="post-metadata">

**Author:** ![a.emrekaraman](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@a.emrekaraman](https://forum.opensearch.org/u/a.emrekaraman)\
**Post date:** [February 15, 2023, 9:35am UTC](https://forum.opensearch.org/t/ism-policy-remove-all-indeces-even-if-i-set-min-time/12488/3 "2023-02-15T09:35:34Z")

</div>

I still having same issue. Anybody have an idea?
