Skip to content

Commit

Permalink
fixing pattern issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheMain committed Dec 11, 2024
1 parent 5496bc8 commit fa35085
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ echo "--- License"
<% end %>
echo "--- Creating ISM policy"
curl -XPUT ${CA} ${CERT} ${KEY} ${BASEURL}/_plugins/_ism/policies/logs-app-rollover_policy -H 'Content-Type: application/json' -d'{"policy":{"description":"Rollover to a new index when age or size becomes our target","default_state":"Rollover","states":[{"name":"Rollover","actions":[{"retry":{"count":3,"backoff":"exponential","delay":"1m"},"rollover":{"min_index_age":"'${INDEX_AGE}'","min_primary_shard_size":"'${DOCUMENT_SIZE}'","copy_alias":false}},{"read_only": {}}],"transitions":[]}],"ism_template":[{"index_patterns":["logs-app-*"],"priority":100}]}}'
curl -XPUT ${CA} ${CERT} ${KEY} ${BASEURL}/_plugins/_ism/policies/logs-app-rollover_policy -H 'Content-Type: application/json' -d'{"policy":{"description":"Rollover to a new index when age or size becomes our target","default_state":"Rollover","states":[{"name":"Rollover","actions":[{"retry":{"count":3,"backoff":"exponential","delay":"1m"},"rollover":{"min_index_age":"'${INDEX_AGE}'","min_primary_shard_size":"'${DOCUMENT_SIZE}'","copy_alias":false}}],"transitions":[]}],"ism_template":[{"index_patterns":["logs-app-*"],"priority":100}]}}'
HTTP_CODE=$(curl -s -o /dev/null -s -w "%{http_code}\n" -I ${CA} ${CERT} ${KEY} ${BASEURL}/_alias/${ALIAS}/ )
if [ "$HTTP_CODE" -ge "201" ]; then
curl -XPUT ${CA} ${CERT} ${KEY} ${BASEURL}/%3Clogs-app-%7Bnow%2Fd%7D-01%3E -H 'Content-Type: application/json' -d'{"aliases": {"'${ALIAS}'": {}}}'
Expand Down

0 comments on commit fa35085

Please sign in to comment.