From 6105976f9ba12609a475f9ac98d362ad66e13f77 Mon Sep 17 00:00:00 2001 From: Hardy Date: Thu, 13 Feb 2025 21:18:12 +0800 Subject: [PATCH] chore: add rollup ilm settings (#128) * chore: add rollup ilm settings * docs: add release notes --------- Co-authored-by: hardy --- config/setup/easysearch/template_rollup.tpl | 37 ++++++++++++++++++++ docs/content.en/docs/release-notes/_index.md | 1 + docs/content.zh/docs/release-notes/_index.md | 1 + 3 files changed, 39 insertions(+) diff --git a/config/setup/easysearch/template_rollup.tpl b/config/setup/easysearch/template_rollup.tpl index 9a8726c6..f466f351 100644 --- a/config/setup/easysearch/template_rollup.tpl +++ b/config/setup/easysearch/template_rollup.tpl @@ -358,5 +358,42 @@ PUT /.easysearch-ilm-config/_settings } } +# ilm settings for rollup indices +DELETE _ilm/policy/ilm_$[[SETUP_INDEX_PREFIX]]rollup-30days-retention +PUT _ilm/policy/ilm_$[[SETUP_INDEX_PREFIX]]rollup-30days-retention +{ + "policy": { + "phases": { + "hot": { + "min_age": "0ms", + "actions": { + "rollover": { + "max_age": "30d", + "max_size": "50gb" + }, + "set_priority": { + "priority": 100 + } + } + }, + "delete": { + "min_age": "30d", + "actions": { + "delete": { + "timestamp_field": "timestamp.date_histogram", + "min_data_age": "30d" + } + } + } + } + } +} + +# add ilm policy to rollup indices +#POST _ilm/add/rollup_index_stats_logs-write +#{ +# "policy_id": "ilm_$[[SETUP_INDEX_PREFIX]]rollup-30days-retention" +#} + # start all rollup jobs POST /_rollup/jobs/rollup*/_start \ No newline at end of file diff --git a/docs/content.en/docs/release-notes/_index.md b/docs/content.en/docs/release-notes/_index.md index 23067613..fe2d282e 100644 --- a/docs/content.en/docs/release-notes/_index.md +++ b/docs/content.en/docs/release-notes/_index.md @@ -13,6 +13,7 @@ Information about release notes of INFINI Console is provided here. ### Features - Support alerts based on bucket diff state (#119) +- Add rollup ilm when use Easysearch (#128) ### Bug fix - Fixed missing data when processing multiple time series in a group with insight data API (#127) diff --git a/docs/content.zh/docs/release-notes/_index.md b/docs/content.zh/docs/release-notes/_index.md index 739af61c..9db422c1 100644 --- a/docs/content.zh/docs/release-notes/_index.md +++ b/docs/content.zh/docs/release-notes/_index.md @@ -13,6 +13,7 @@ title: "版本历史" ### Features - 告警功能支持根据桶之间文档数差值和内容差异告警 (#119) +- 当使用 Easysearch 存储指标时,增加 Rollup 索引生命周期 (#128) ### Bug fix - 修复 Insight API 处理多时间序列数据时数据丢失的问题 (#127)