mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-10 11:12:51 +01:00
set logstash pillar and enable avanced ls menu for so-receiver
This commit is contained in:
@@ -1327,15 +1327,6 @@ elasticsearch_pillar() {
|
|||||||
" log_size_limit: $log_size_limit"\
|
" log_size_limit: $log_size_limit"\
|
||||||
" node_route_type: 'hot'"\
|
" node_route_type: 'hot'"\
|
||||||
"" >> "$pillar_file"
|
"" >> "$pillar_file"
|
||||||
|
|
||||||
printf '%s\n'\
|
|
||||||
"logstash_settings:"\
|
|
||||||
" ls_pipeline_batch_size: $LSPIPELINEBATCH"\
|
|
||||||
" ls_input_threads: $LSINPUTTHREADS"\
|
|
||||||
" lsheap: $NODE_LS_HEAP_SIZE"\
|
|
||||||
" ls_pipeline_workers: $num_cpu_cores"\
|
|
||||||
"" >> "$pillar_file"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
es_heapsize() {
|
es_heapsize() {
|
||||||
@@ -1554,6 +1545,20 @@ import_registry_docker() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logstash_pillar() {
|
||||||
|
|
||||||
|
local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls
|
||||||
|
|
||||||
|
# Create the logstash pillar
|
||||||
|
printf '%s\n'\
|
||||||
|
"logstash_settings:"\
|
||||||
|
" ls_pipeline_batch_size: $LSPIPELINEBATCH"\
|
||||||
|
" ls_input_threads: $LSINPUTTHREADS"\
|
||||||
|
" lsheap: $NODE_LS_HEAP_SIZE"\
|
||||||
|
" ls_pipeline_workers: $num_cpu_cores"\
|
||||||
|
"" >> "$pillar_file"
|
||||||
|
}
|
||||||
|
|
||||||
# Set Logstash heap size based on total memory
|
# Set Logstash heap size based on total memory
|
||||||
ls_heapsize() {
|
ls_heapsize() {
|
||||||
|
|
||||||
@@ -2407,11 +2412,6 @@ securityonion_repo() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_base_heapsizes() {
|
|
||||||
es_heapsize
|
|
||||||
ls_heapsize
|
|
||||||
}
|
|
||||||
|
|
||||||
set_network_dev_status_list() {
|
set_network_dev_status_list() {
|
||||||
readarray -t nmcli_dev_status_list <<< "$(nmcli -t -f DEVICE,STATE -c no dev status)"
|
readarray -t nmcli_dev_status_list <<< "$(nmcli -t -f DEVICE,STATE -c no dev status)"
|
||||||
export nmcli_dev_status_list
|
export nmcli_dev_status_list
|
||||||
|
|||||||
@@ -464,8 +464,14 @@ if [[ $is_helix || $is_manager || $is_import ]]; then
|
|||||||
collect_homenet_mngr
|
collect_homenet_mngr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#set base elasticsearch heap size
|
||||||
if [[ $is_helix || $is_manager || $is_node || $is_import ]]; then
|
if [[ $is_helix || $is_manager || $is_node || $is_import ]]; then
|
||||||
set_base_heapsizes
|
es_heapsize
|
||||||
|
fi
|
||||||
|
|
||||||
|
#set base logstash heap size
|
||||||
|
if [[ $is_helix || $is_manager || $is_node || $is_import || $is_receiver ]]; then
|
||||||
|
ls_heapsize
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_manager && ! $is_eval ]]; then
|
if [[ $is_manager && ! $is_eval ]]; then
|
||||||
@@ -544,17 +550,21 @@ fi
|
|||||||
|
|
||||||
[[ $is_iso ]] && collect_ntp_servers
|
[[ $is_iso ]] && collect_ntp_servers
|
||||||
|
|
||||||
if [[ $is_node && ! $is_eval ]]; then
|
if [[ ($is_node || $is_receiver) && ! $is_eval ]]; then
|
||||||
whiptail_node_advanced
|
whiptail_node_advanced
|
||||||
if [ "$NODESETUP" == 'NODEADVANCED' ]; then
|
if [ "$NODESETUP" == 'NODEADVANCED' ]; then
|
||||||
collect_node_es_heap
|
if [[ ! $is_receiver ]]; then
|
||||||
|
collect_node_es_heap
|
||||||
|
collect_es_space_limit
|
||||||
|
fi
|
||||||
collect_node_ls_heap
|
collect_node_ls_heap
|
||||||
collect_node_ls_pipeline_worker_count
|
collect_node_ls_pipeline_worker_count
|
||||||
collect_node_ls_pipeline_batch_size
|
collect_node_ls_pipeline_batch_size
|
||||||
collect_node_ls_input
|
collect_node_ls_input
|
||||||
collect_es_space_limit
|
|
||||||
else
|
else
|
||||||
NODE_ES_HEAP_SIZE=$ES_HEAP_SIZE
|
if [[ ! $is_receiver ]]; then
|
||||||
|
NODE_ES_HEAP_SIZE=$ES_HEAP_SIZE
|
||||||
|
fi
|
||||||
NODE_LS_HEAP_SIZE=$LS_HEAP_SIZE
|
NODE_LS_HEAP_SIZE=$LS_HEAP_SIZE
|
||||||
LSPIPELINEWORKERS=$num_cpu_cores
|
LSPIPELINEWORKERS=$num_cpu_cores
|
||||||
LSPIPELINEBATCH=125
|
LSPIPELINEBATCH=125
|
||||||
@@ -727,6 +737,12 @@ echo "1" > /root/accept_changes
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $is_node || $is_receiver ]]; then
|
||||||
|
set_progress_str 19 'Generating logstash pillar'
|
||||||
|
logstash_pillar >> $setup_log 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $is_minion ]]; then
|
if [[ $is_minion ]]; then
|
||||||
set_progress_str 20 'Accepting Salt key on manager'
|
set_progress_str 20 'Accepting Salt key on manager'
|
||||||
retry 20 10 accept_salt_key_remote "going to be accepted" >> $setup_log 2>&1
|
retry 20 10 accept_salt_key_remote "going to be accepted" >> $setup_log 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user