mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 05:53:09 +01:00
Merge remote-tracking branch 'origin/2.4/dev' into foxtrot
This commit is contained in:
@@ -427,7 +427,8 @@ postupgrade_changes() {
|
||||
[[ "$POSTVERSION" == 2.4.80 ]] && post_to_2.4.90
|
||||
[[ "$POSTVERSION" == 2.4.90 ]] && post_to_2.4.100
|
||||
[[ "$POSTVERSION" == 2.4.100 ]] && post_to_2.4.110
|
||||
[[ "$POSTVERSION" == 2.4.110 ]] && post_to_2.4.120
|
||||
[[ "$POSTVERSION" == 2.4.110 ]] && post_to_2.4.111
|
||||
[[ "$POSTVERSION" == 2.4.111 ]] && post_to_2.4.120
|
||||
true
|
||||
}
|
||||
|
||||
@@ -528,6 +529,9 @@ post_to_2.4.111() {
|
||||
post_to_2.4.120() {
|
||||
update_elasticsearch_index_settings
|
||||
|
||||
# Manually rollover suricata alerts index to ensure data_stream.dataset expected mapping is set to 'suricata'
|
||||
rollover_index "logs-suricata.alerts-so"
|
||||
|
||||
# Sync the newly generated index templates for elasticfleet integrations
|
||||
salt-call state.apply elasticsearch queue=True
|
||||
|
||||
@@ -811,6 +815,22 @@ ASSIST_EOF
|
||||
fi
|
||||
}
|
||||
|
||||
rollover_index() {
|
||||
idx=$1
|
||||
exists=$(so-elasticsearch-query $idx -o /dev/null -w "%{http_code}")
|
||||
if [[ $exists -eq 200 ]]; then
|
||||
rollover=$(so-elasticsearch-query $idx/_rollover -o /dev/null -w "%{http_code}" -XPOST)
|
||||
|
||||
if [[ $rollover -eq 200 ]]; then
|
||||
echo "Successfully triggered rollover for $idx..."
|
||||
else
|
||||
echo "Could not trigger rollover for $idx..."
|
||||
fi
|
||||
else
|
||||
echo "Could not find index $idx..."
|
||||
fi
|
||||
}
|
||||
|
||||
suricata_idstools_migration() {
|
||||
#Backup the pillars for idstools
|
||||
mkdir -p /nsm/backup/detections-migration/idstools
|
||||
|
||||
Reference in New Issue
Block a user