使用 Open Distro for Elasticsearch 针对索引生命周期管理

作者: root007 分类: Linux 发布时间: 2024-05-29 10:36
PUT _opendistro/_ism/policies/test-ttt-del

{
    "policy": {
        "policy_id": "test-ttt-del",
        "description": "Delete indexes that expire in 30 days",
        "last_updated_time": 1716882079492,
        "schema_version": 1,
        "error_notification": null,
        "default_state": "hot",
        "states": [
            {
                "name": "hot",
                "actions": [],
                "transitions": [
                    {
                        "state_name": "delete",
                        "conditions": {
                            "min_index_age": "1h"
                        }
                    }
                ]
            },
            {
                "name": "delete",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        },
                        "delete": {}
                    }
                ],
                "transitions": []
            }
        ],
        "ism_template": {
            "index_patterns": [
                "test-ttt-*"
            ],
            "priority": 100,
            "last_updated_time": 1716881979953
        }
    }
}

ism_template在7.10.2是支持的 不需要添加template “opendistro.index_state_management.policy_id”:

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注