- Elasticsearch 教程
- Elasticsearch - 首页
- Elasticsearch - 基本概念
- Elasticsearch - 安装
- Elasticsearch - 数据填充
- 版本之间迁移
- Elasticsearch - API 约定
- Elasticsearch - 文档 API
- Elasticsearch - 搜索 API
- Elasticsearch - 聚合
- Elasticsearch - 索引 API
- Elasticsearch - CAT API
- Elasticsearch - 集群 API
- Elasticsearch - 查询 DSL
- Elasticsearch - 映射
- Elasticsearch - 分析
- Elasticsearch - 模块
- Elasticsearch - 索引模块
- Elasticsearch - Ingest 节点
- Elasticsearch - 管理索引生命周期
- Elasticsearch - SQL 访问
- Elasticsearch - 监控
- Elasticsearch - 数据汇总
- Elasticsearch - 冻结索引
- Elasticsearch - 测试
- Elasticsearch - Kibana 仪表盘
- Elasticsearch - 按字段过滤
- Elasticsearch - 数据表
- Elasticsearch - 区域地图
- Elasticsearch - 饼图
- Elasticsearch - 面积图和条形图
- Elasticsearch - 时间序列
- Elasticsearch - 标签云
- Elasticsearch - 热力图
- Elasticsearch - Canvas
- Elasticsearch - 日志 UI
- Elasticsearch 有用资源
- Elasticsearch - 快速指南
- Elasticsearch - 有用资源
- Elasticsearch - 讨论
Elasticsearch - 管理索引生命周期
管理索引生命周期涉及根据分片大小和性能要求等因素执行管理操作。索引生命周期管理 (ILM) API 使您能够自动化您希望如何随着时间的推移管理索引。
本章列出了 ILM API 及其用法。
策略管理 API
| API 名称 | 用途 | 示例 |
|---|---|---|
| 创建生命周期策略。 | 创建一个生命周期策略。如果指定的策略存在,则替换该策略并增加策略版本。 | PUT_ilm/policy/policy_id |
| 获取生命周期策略。 | 返回指定的策略定义。包括策略版本和上次修改日期。如果未指定策略,则返回所有已定义的策略。 | GET_ilm/policy/policy_id |
| 删除生命周期策略 | 删除指定的生命周期策略定义。您无法删除当前正在使用的策略。如果该策略用于管理任何索引,则请求失败并返回错误。 | DELETE_ilm/policy/policy_id |
索引管理 API
| API 名称 | 用途 | 示例 |
|---|---|---|
| 移动到生命周期步骤 API。 | 手动将索引移动到指定的步骤并执行该步骤。 | POST_ilm/move/index |
| 重试策略。 | 将策略设置回发生错误的步骤并执行该步骤。 | POST index/_ilm/retry |
| 从索引 API 编辑中删除策略。 | 删除分配的生命周期策略并停止管理指定的索引。如果指定了索引模式,则从所有匹配的索引中删除分配的策略。 | POST index/_ilm/remove |
操作管理 API
| API 名称 | 用途 | 示例 |
|---|---|---|
| 获取索引生命周期管理状态 API。 | 返回 ILM 插件的状态。响应中的 operation_mode 字段显示以下三种状态之一:STARTED、STOPPING 或 STOPPED。 | GET /_ilm/status |
| 启动索引生命周期管理 API。 | 如果 ILM 当前已停止,则启动 ILM 插件。在集群形成时会自动启动 ILM。 | POST /_ilm/start |
| 停止索引生命周期管理 API。 | 停止所有生命周期管理操作并停止 ILM 插件。当您对集群执行维护并且需要阻止 ILM 对您的索引执行任何操作时,这很有用。 | POST /_ilm/stop |
| 解释生命周期 API。 | 检索有关索引当前生命周期状态的信息,例如当前正在执行的阶段、操作和步骤。显示索引何时进入每个阶段、正在运行的阶段的定义以及有关任何错误的信息。 | GET index/_ilm/explain |
广告