use auto_expand_replica, configure ilm for so-case* & so-detection*

Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
reyesj2
2024-11-11 13:51:48 -06:00
parent f7c3957a43
commit 6dbe0645e5
2 changed files with 26 additions and 1 deletions

View File

@@ -520,7 +520,16 @@ post_to_2.4.110() {
}
post_to_2.4.120() {
echo "Nothing to apply"
for idx in "so-detection" "so-detectionhistory" "so-case" "so-casehistory"; do
JSON_STRING=$( jq -n \
--arg INDEX_NAME "$idx" \
'{"settings": {"index.auto_expand_replicas":"0-2","index.lifecycle.name":($INDEX_NAME) + "-logs"}}'
)
echo "Updating $idx index settings"
retry 5 15 "so-elasticsearch-query $idx/_settings -d "$JSON_STRING" -XPUT| grep '{\"acknowledged\":true}'"
echo ""
done
POSTVERSION=2.4.120
}