mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
Merge pull request #8288 from Security-Onion-Solutions/fix/soup_elastalert_indices_deletion_check
Ensure Elastalert indices are deleted before continuing with SOUP
This commit is contained in:
@@ -851,6 +851,13 @@ up_to_2.3.140() {
|
||||
|
||||
# Delete Elastalert indices
|
||||
for i in $(so-elasticsearch-query _cat/indices | grep elastalert | awk '{print $3}'); do so-elasticsearch-query $i -XDELETE; done
|
||||
# Check to ensure Elastalert indices have been deleted
|
||||
RESPONSE=$(so-elasticsearch-query elastalert*)
|
||||
if [[ "$RESPONSE" == "{}" ]]; then
|
||||
echo "Elastalert indices have been deleted."
|
||||
else
|
||||
fail "Something went wrong. Could not delete the Elastalert indices. Exiting."
|
||||
fi
|
||||
##
|
||||
INSTALLEDVERSION=2.3.140
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user