mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
use auto_expand_replica, configure ilm for so-case* & so-detection*
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -111,15 +111,23 @@ elasticsearch:
|
|||||||
match_mapping_type: string
|
match_mapping_type: string
|
||||||
settings:
|
settings:
|
||||||
index:
|
index:
|
||||||
|
lifecycle:
|
||||||
|
name: so-case-logs
|
||||||
mapping:
|
mapping:
|
||||||
total_fields:
|
total_fields:
|
||||||
limit: 1500
|
limit: 1500
|
||||||
number_of_replicas: 0
|
number_of_replicas: 0
|
||||||
|
auto_expand_replicas: 0-2
|
||||||
number_of_shards: 1
|
number_of_shards: 1
|
||||||
refresh_interval: 30s
|
refresh_interval: 30s
|
||||||
sort:
|
sort:
|
||||||
field: '@timestamp'
|
field: '@timestamp'
|
||||||
order: desc
|
order: desc
|
||||||
|
policy:
|
||||||
|
phases:
|
||||||
|
hot:
|
||||||
|
actions: {}
|
||||||
|
min_age: 0ms
|
||||||
so-common:
|
so-common:
|
||||||
close: 30
|
close: 30
|
||||||
delete: 365
|
delete: 365
|
||||||
@@ -258,15 +266,23 @@ elasticsearch:
|
|||||||
match_mapping_type: string
|
match_mapping_type: string
|
||||||
settings:
|
settings:
|
||||||
index:
|
index:
|
||||||
|
lifecycle:
|
||||||
|
name: so-detection-logs
|
||||||
mapping:
|
mapping:
|
||||||
total_fields:
|
total_fields:
|
||||||
limit: 1500
|
limit: 1500
|
||||||
number_of_replicas: 0
|
number_of_replicas: 0
|
||||||
|
auto_expand_replicas: 0-2
|
||||||
number_of_shards: 1
|
number_of_shards: 1
|
||||||
refresh_interval: 30s
|
refresh_interval: 30s
|
||||||
sort:
|
sort:
|
||||||
field: '@timestamp'
|
field: '@timestamp'
|
||||||
order: desc
|
order: desc
|
||||||
|
policy:
|
||||||
|
phases:
|
||||||
|
hot:
|
||||||
|
actions: {}
|
||||||
|
min_age: 0ms
|
||||||
so-endgame:
|
so-endgame:
|
||||||
index_sorting: false
|
index_sorting: false
|
||||||
index_template:
|
index_template:
|
||||||
|
|||||||
@@ -520,7 +520,16 @@ post_to_2.4.110() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_to_2.4.120() {
|
post_to_2.4.120() {
|
||||||
echo "Nothing to apply"
|
for idx in "so-detection" "so-detectionhistory" "so-case" "so-casehistory"; do
|
||||||
|
JSON_STRING=$( jq -n \
|
||||||
|
--arg INDEX_NAME "$idx" \
|
||||||
|
'{"settings": {"index.auto_expand_replicas":"0-2","index.lifecycle.name":($INDEX_NAME) + "-logs"}}'
|
||||||
|
)
|
||||||
|
echo "Updating $idx index settings"
|
||||||
|
retry 5 15 "so-elasticsearch-query $idx/_settings -d "$JSON_STRING" -XPUT| grep '{\"acknowledged\":true}'"
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
|
|
||||||
POSTVERSION=2.4.120
|
POSTVERSION=2.4.120
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user