- 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 |
廣告