mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Perform Elastalert index check twice
This commit is contained in:
@@ -850,10 +850,10 @@ up_to_2.3.140() {
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CHECK_COUNT=0
|
||||
while [[ "$CHECK_COUNT" -le 2 ]]; do
|
||||
# Delete Elastalert indices
|
||||
for i in $(so-elasticsearch-query _cat/indices | grep elastalert | awk '{print $3}');
|
||||
do
|
||||
for i in $(so-elasticsearch-query _cat/indices | grep elastalert | awk '{print $3}'); do
|
||||
so-elasticsearch-query $i -XDELETE;
|
||||
done
|
||||
|
||||
@@ -872,6 +872,9 @@ up_to_2.3.140() {
|
||||
echo -n "."
|
||||
fi
|
||||
done
|
||||
((CHECK_COUNT+=1))
|
||||
done
|
||||
|
||||
|
||||
# If we were unable to delete the Elastalert indices, exit the script
|
||||
if [ "$ELASTALERT_INDICES_DELETED" == "no" ]; then
|
||||
|
||||
Reference in New Issue
Block a user