argus/deployment_new/templates/server/scripts/es-watermark-restore.sh
yuyr 7430896fab v1.0.0 发布合并回master (#52)
Co-authored-by: sundapeng <sundp@mail.zgclab.edu.cn>
Co-authored-by: xuxt <xuxt@zgclab.edu.cn>
Reviewed-on: #52
2025-11-25 16:00:50 +08:00

12 lines
428 B
Bash

#!/usr/bin/env bash
set -euo pipefail
HOST="${1:-http://127.0.0.1:9200}"
echo "恢复 ES watermark 为默认值: $HOST"
curl -fsS -XPUT "$HOST/_cluster/settings" -H 'Content-Type: application/json' -d '{
"transient": {
"cluster.routing.allocation.disk.watermark.low": null,
"cluster.routing.allocation.disk.watermark.high": null,
"cluster.routing.allocation.disk.watermark.flood_stage": null
}
}' && echo "\nOK"