mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
add logstash pillar items for minions
This commit is contained in:
@@ -119,6 +119,18 @@ function add_elastic_to_minion() {
|
|||||||
" " >> $PILLARFILE
|
" " >> $PILLARFILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function add_logstash_to_minion() {
|
||||||
|
# Create the logstash advanced pillar
|
||||||
|
printf '%s\n'\
|
||||||
|
"logstash_settings:"\
|
||||||
|
" ls_host: '$LSHOSTNAME'"\
|
||||||
|
" ls_pipeline_batch_size: 125"\
|
||||||
|
" ls_input_threads: 1"\
|
||||||
|
" lsheap: $LSHEAP"\
|
||||||
|
" ls_pipeline_workers: $CPUCORES"\
|
||||||
|
" " >> $PILLARFILE
|
||||||
|
}
|
||||||
|
|
||||||
# Analyst Workstation
|
# Analyst Workstation
|
||||||
function add_analyst_to_minion() {
|
function add_analyst_to_minion() {
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
@@ -167,6 +179,7 @@ function add_sensor_to_minion() {
|
|||||||
|
|
||||||
function createEVAL() {
|
function createEVAL() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
add_sensor_to_minion
|
add_sensor_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,20 +189,24 @@ function createIDHNODE() {
|
|||||||
|
|
||||||
function createIMPORT() {
|
function createIMPORT() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
add_sensor_to_minion
|
add_sensor_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
function createHEAVYNODE() {
|
function createHEAVYNODE() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
add_sensor_to_minion
|
add_sensor_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMANAGER() {
|
function createMANAGER() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMANAGERSEARCH() {
|
function createMANAGERSEARCH() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSENSOR() {
|
function createSENSOR() {
|
||||||
@@ -198,10 +215,12 @@ function createSENSOR() {
|
|||||||
|
|
||||||
function createSEARCHNODE() {
|
function createSEARCHNODE() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSTANDALONE() {
|
function createSTANDALONE() {
|
||||||
add_elastic_to_minion
|
add_elastic_to_minion
|
||||||
|
add_logstash_to_minion
|
||||||
add_sensor_to_minion
|
add_sensor_to_minion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1307,15 +1307,7 @@ idh_pillar() {
|
|||||||
logstash_pillar() {
|
logstash_pillar() {
|
||||||
# Create the logstash advanced pillar
|
# Create the logstash advanced pillar
|
||||||
touch $adv_logstash_pillar_file
|
touch $adv_logstash_pillar_file
|
||||||
title "Create the logstash pillar"
|
touch $logstash_pillar_file
|
||||||
printf '%s\n'\
|
|
||||||
"logstash_settings:"\
|
|
||||||
" ls_host: '$HOSTNAME'"\
|
|
||||||
" ls_pipeline_batch_size: 125"\
|
|
||||||
" ls_input_threads: 1"\
|
|
||||||
" lsheap: $NODE_LS_HEAP_SIZE"\
|
|
||||||
" ls_pipeline_workers: $num_cpu_cores"\
|
|
||||||
"" > "$logstash_pillar_file"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set Logstash heap size based on total memory
|
# Set Logstash heap size based on total memory
|
||||||
@@ -1339,10 +1331,6 @@ ls_heapsize() {
|
|||||||
esac
|
esac
|
||||||
export LS_HEAP_SIZE
|
export LS_HEAP_SIZE
|
||||||
|
|
||||||
if [[ "$install_type" =~ ^(EVAL|MANAGERSEARCH|STANDALONE)$ ]]; then
|
|
||||||
NODE_LS_HEAP_SIZE=$LS_HEAP_SIZE
|
|
||||||
export NODE_LS_HEAP_SIZE
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
idstools_pillar() {
|
idstools_pillar() {
|
||||||
@@ -1887,6 +1875,9 @@ drop_install_options() {
|
|||||||
NODETYPE=${install_type^^}
|
NODETYPE=${install_type^^}
|
||||||
echo "NODETYPE=$NODETYPE" >> /opt/so/install.txt
|
echo "NODETYPE=$NODETYPE" >> /opt/so/install.txt
|
||||||
echo "CORECOUNT=$lb_procs" >> /opt/so/install.txt
|
echo "CORECOUNT=$lb_procs" >> /opt/so/install.txt
|
||||||
|
echo "LSHOSTNAME=$HOSTNAME" >> /opt/so/install.txt
|
||||||
|
echo "LSHEAP=$LS_HEAP_SIZE" >> /opt/so/install.txt
|
||||||
|
echo "CPUCORES=$num_cpu_cores" >> /opt/so/install.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_package() {
|
remove_package() {
|
||||||
|
|||||||
@@ -528,6 +528,9 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
export PATCHSCHEDULENAME=$PATCHSCHEDULENAME
|
export PATCHSCHEDULENAME=$PATCHSCHEDULENAME
|
||||||
export INTERFACE="bond0"
|
export INTERFACE="bond0"
|
||||||
export CORECOUNT=$lb_procs
|
export CORECOUNT=$lb_procs
|
||||||
|
export LSHOSTNAME=$HOSTNAME
|
||||||
|
export LSHEAP=$LS_HEAP_SIZE
|
||||||
|
export CPUCORES=$num_cpu_cores
|
||||||
logCmd "so-minion -o=setup"
|
logCmd "so-minion -o=setup"
|
||||||
title "Creating Global SLS"
|
title "Creating Global SLS"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user