Skip to content

Commit

Permalink
Merge pull request #1118 from wazuh/1115-ism-rollover-update-the-ism-…
Browse files Browse the repository at this point in the history
…checksh-script-to-accept-all-parameters

[ISM Rollover] Update the ism-check.sh script to accept all parameters
  • Loading branch information
c-bordon authored Nov 15, 2023
2 parents 6b910bc + 9f58e6f commit 351c6b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build-docker-images/wazuh-indexer/config/ism-check.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/bash
MIN_SHARD_SIZE=${MIN_SHARD_SIZE:-25}
MIN_INDEX_AGE=${MIN_INDEX_AGE:-"7d"}
MIN_DOC_COUNT=${MIN_DOC_COUNT:-600000000}
ISM_PRIORITY=${ISM_PRIORITY:-50}
SERVER=`hostname`
if [[ -n "$INDEXER_PASSWORD" ]]; then
until [[ `curl -XGET https://$SERVER:9200/_cat/indices -u admin:SecretPassword -k -s | grep .opendistro_security | wc -l` -eq 1 ]]
do
echo "Wazuh indexer Security is not initiaized";
sleep 30
done
bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -p $INDEXER_PASSWORD -i $SERVER
bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -p $INDEXER_PASSWORD -i $SERVER -P $ISM_PRIORITY -d $MIN_DOC_COUNT -a $MIN_INDEX_AGE -s $MIN_SHARD_SIZE
fi

0 comments on commit 351c6b3

Please sign in to comment.