J
J
Johnick2021-12-27 20:25:45
elasticsearch
Johnick, 2021-12-27 20:25:45

How to set up ISM in Open Distro?

Greetings. Index State Management question in Open Distro for Elasticsearch
Need to create a policy to drop old indexes.
I create this policy:

{
    "policy": {
        "policy_id": "delete_old",
        "description": "A simple default policy that deletes old indicies.",
        "default_state": "open",
        "states": [
            {
                "name": "open",
                "actions": [
                    {
                        "open": {}
                    }
                ],
                "transitions": [
                    {
                        "state_name": "delete",
                        "conditions": {
                            "min_index_age": "5d"
                        }
                    }
                ]
            },
            {
                "name": "delete",
                "actions": [
                    {
                        "delete": {}
                    }
                ],
                "transitions": []
            }
        ]
    }
}


Next, I add a template with a mask:
PUT _template/template_1
{
    "index_patterns" : ["index-*"],
    "order" : 1,
    "settings" : {
        "index.opendistro.index_state_management.policy_id": "delete_old"
    },
    "mappings" : {
        "_source" : { "enabled" : true }
    }
}


When creating new indexes, this template is applied, but automatically, after the specified time has elapsed, index processing is not started. If this policy is manually hung up on the index, through the admin panel, then it works out.

Has anyone done this, what am I missing?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question