mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 14:02:52 +01:00
change log_size_limit logic - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/551
This commit is contained in:
@@ -720,15 +720,25 @@ get_filesystem_nsm(){
|
|||||||
|
|
||||||
get_log_size_limit() {
|
get_log_size_limit() {
|
||||||
|
|
||||||
DISK_DIR="/"
|
case $INSTALLTYPE in
|
||||||
if [ -d /nsm ]; then
|
EVAL | HEAVYNODE)
|
||||||
DISK_DIR="/nsm"
|
PERCENTAGE=50
|
||||||
fi
|
;;
|
||||||
DISK_SIZE_K=`df $DISK_DIR |grep -v "^Filesystem" | awk '{print $2}'`
|
*)
|
||||||
PERCENTAGE=85
|
PERCENTAGE=80
|
||||||
DISK_SIZE=DISK_SIZE_K*1000
|
;;
|
||||||
PERCENTAGE_DISK_SPACE=`echo $(($DISK_SIZE*$PERCENTAGE/100))`
|
esac
|
||||||
LOG_SIZE_LIMIT=$(($PERCENTAGE_DISK_SPACE/1000000000))
|
|
||||||
|
DISK_DIR="/"
|
||||||
|
|
||||||
|
if [ -d /nsm ]; then
|
||||||
|
DISK_DIR="/nsm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DISK_SIZE_K=`df $DISK_DIR |grep -v "^Filesystem" | awk '{print $2}'`
|
||||||
|
DISK_SIZE=DISK_SIZE_K*1000
|
||||||
|
PERCENTAGE_DISK_SPACE=`echo $(($DISK_SIZE*$PERCENTAGE/100))`
|
||||||
|
LOG_SIZE_LIMIT=$(($PERCENTAGE_DISK_SPACE/1000000000))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ whiptail_log_size_limit() {
|
|||||||
|
|
||||||
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. \
|
||||||
By default, this is set to 85% of the disk space allotted for /nsm." 10 75 $LOG_SIZE_LIMIT 3>&1 1>&2 2>&3)
|
By default, this is set to 80% of the disk space allotted for /nsm." 10 75 $LOG_SIZE_LIMIT 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|||||||
Reference in New Issue
Block a user