Hey @asfoorial
I get it, sometime when messing with Policys it doesnt work well when a index set is not in a Green state.
I think your looking for something like this
{
"id": "something",
"seqNo": 6192,
"primaryTerm": 16,
"policy": {
"policy_id": "something",
"description": "testing",
"last_updated_time": 1708402901021,
"schema_version": 19,
"error_notification": null,
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [],
"transitions": [
{
"state_name": "close",
"conditions": {
"min_size": "1mb"
}
}
]
},
{
"name": "close",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"close": {}
}
],
"transitions": []
},
{
"name": "delete",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"security"
],
"priority": 200,
"last_updated_time": 1708402712551
}
]
}
}
Insted of using the Dev tools try to use the dashbaord visual editor. if its not correct it will error out.
Edit: Or something like this
{
"id": "a policy to close an index after it crosses 1mb",
"seqNo": 6139,
"primaryTerm": 16,
"policy": {
"policy_id": "a policy to close an index after it crosses 1mb",
"description": "a policy to close an index after it crosses 1mb",
"last_updated_time": 1708400771608,
"schema_version": 19,
"error_notification": null,
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"rollover": {
"min_size": "1mb",
"copy_alias": false
}
},
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"close": {}
},
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"security"
],
"priority": 100,
"last_updated_time": 1708400248905
}
]
}
}
I havent got chance to test it but I think you get the point