mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
Merge remote-tracking branch 'remotes/origin/dev' into issue/749
This commit is contained in:
@@ -38,31 +38,3 @@ calculate_useable_cores() {
|
|||||||
if [ "$lb_procs_round" -lt 1 ]; then lb_procs=1; else lb_procs=$lb_procs_round; fi
|
if [ "$lb_procs_round" -lt 1 ]; then lb_procs=1; else lb_procs=$lb_procs_round; fi
|
||||||
export lb_procs
|
export lb_procs
|
||||||
}
|
}
|
||||||
|
|
||||||
set_defaul_log_size() {
|
|
||||||
local percentage
|
|
||||||
|
|
||||||
case $INSTALLTYPE in
|
|
||||||
EVAL | HEAVYNODE)
|
|
||||||
percentage=50
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
percentage=80
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
local disk_dir="/"
|
|
||||||
if [ -d /nsm ]; then
|
|
||||||
disk_dir="/nsm"
|
|
||||||
fi
|
|
||||||
local disk_size_1k
|
|
||||||
disk_size_1k=$(df $disk_dir | grep -v "^Filesystem" | awk '{print $2}')
|
|
||||||
|
|
||||||
local ratio="1048576"
|
|
||||||
|
|
||||||
local disk_size_gb
|
|
||||||
disk_size_gb=$( echo "$disk_size_1k" "$ratio" | awk '{print($1/$2)}' )
|
|
||||||
|
|
||||||
log_size_limit=$( echo "$disk_size_gb" "$percentage" | awk '{printf("%.0f", $1 * ($2/100))}')
|
|
||||||
export log_size_limit
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1353,6 +1353,33 @@ sensor_pillar() {
|
|||||||
cat "$pillar_file" >> "$setup_log" 2>&1
|
cat "$pillar_file" >> "$setup_log" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_default_log_size() {
|
||||||
|
local percentage
|
||||||
|
|
||||||
|
case $INSTALLTYPE in
|
||||||
|
EVAL | HEAVYNODE)
|
||||||
|
percentage=50
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
percentage=80
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local disk_dir="/"
|
||||||
|
if [ -d /nsm ]; then
|
||||||
|
disk_dir="/nsm"
|
||||||
|
fi
|
||||||
|
local disk_size_1k
|
||||||
|
disk_size_1k=$(df $disk_dir | grep -v "^Filesystem" | awk '{print $2}')
|
||||||
|
|
||||||
|
local ratio="1048576"
|
||||||
|
|
||||||
|
local disk_size_gb
|
||||||
|
disk_size_gb=$( echo "$disk_size_1k" "$ratio" | awk '{print($1/$2)}' )
|
||||||
|
|
||||||
|
log_size_limit=$( echo "$disk_size_gb" "$percentage" | awk '{printf("%.0f", $1 * ($2/100))}')
|
||||||
|
}
|
||||||
|
|
||||||
set_hostname() {
|
set_hostname() {
|
||||||
|
|
||||||
set_hostname_iso
|
set_hostname_iso
|
||||||
|
|||||||
@@ -177,17 +177,21 @@ echo "MINION_ID = $MINION_ID" >> $setup_log 2>&1
|
|||||||
|
|
||||||
minion_type=$(get_minion_type)
|
minion_type=$(get_minion_type)
|
||||||
|
|
||||||
# Set any constants needed
|
# Set any variables needed
|
||||||
|
set_default_log_size >> $setup_log 2>&1
|
||||||
|
|
||||||
if [[ $is_helix ]]; then
|
if [[ $is_helix ]]; then
|
||||||
RULESETUP=ETOPEN
|
RULESETUP=ETOPEN
|
||||||
NSMSETUP=BASIC
|
NSMSETUP=BASIC
|
||||||
HNSENSOR=inherit
|
HNSENSOR=inherit
|
||||||
MASTERUPDATES=0
|
MASTERUPDATES=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_helix || ( $is_master && $is_node ) ]]; then
|
if [[ $is_helix || ( $is_master && $is_node ) ]]; then
|
||||||
RULESETUP=ETOPEN
|
RULESETUP=ETOPEN
|
||||||
NSMSETUP=BASIC
|
NSMSETUP=BASIC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_master && $is_node ]]; then
|
if [[ $is_master && $is_node ]]; then
|
||||||
LSPIPELINEWORKERS=1
|
LSPIPELINEWORKERS=1
|
||||||
LSPIPELINEBATCH=125
|
LSPIPELINEBATCH=125
|
||||||
@@ -196,6 +200,7 @@ if [[ $is_master && $is_node ]]; then
|
|||||||
NIDS=Suricata
|
NIDS=Suricata
|
||||||
BROVERSION=ZEEK
|
BROVERSION=ZEEK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_node ]]; then
|
if [[ $is_node ]]; then
|
||||||
CURCLOSEDAYS=30
|
CURCLOSEDAYS=30
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -413,7 +413,6 @@ whiptail_log_size_limit() {
|
|||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
set_defaul_log_size
|
|
||||||
|
|
||||||
log_size_limit=$(whiptail --title "Security Onion Setup" --inputbox \
|
log_size_limit=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||||
"Please specify the amount of disk space (in GB) you would like to allocate for Elasticsearch data storage. \
|
"Please specify the amount of disk space (in GB) you would like to allocate for Elasticsearch data storage. \
|
||||||
|
|||||||
Reference in New Issue
Block a user