mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add so-minion modifications
This commit is contained in:
@@ -79,6 +79,30 @@ function getinstallinfo() {
|
|||||||
source <(echo $INSTALLVARS)
|
source <(echo $INSTALLVARS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pcapspace() {
|
||||||
|
|
||||||
|
local NSMSIZE=$(salt \* disk.usage --out=json | jq -r '.[]."/nsm"."1K-blocks" ')
|
||||||
|
local ROOTSIZE=$(salt \* disk.usage --out=json | jq -r '.[]."/"."1K-blocks" ')
|
||||||
|
|
||||||
|
if [[ "$NSMSIZE" == "null" ]]; then
|
||||||
|
# Looks like there is no dedicated nsm partition. Using root
|
||||||
|
local SPACESIZE=$ROOTSIZE
|
||||||
|
else
|
||||||
|
local SPACESIZE=$NSMSIZE
|
||||||
|
fi
|
||||||
|
|
||||||
|
local s=$(( $SPACESIZE / 1000000 ))
|
||||||
|
local s1=$(( $s / 2 ))
|
||||||
|
local s2=$(( $s1 / $lb_procs ))
|
||||||
|
|
||||||
|
printf '%s\n'\
|
||||||
|
"suricata:"\
|
||||||
|
" config:"\
|
||||||
|
" output:"\
|
||||||
|
" pcap-log: $s" >> $PILLARFILE
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function testMinion() {
|
function testMinion() {
|
||||||
# Always run on the host, since this is going to be the manager of a distributed grid, or an eval/standalone.
|
# Always run on the host, since this is going to be the manager of a distributed grid, or an eval/standalone.
|
||||||
# Distributed managers must run this in order for the sensor nodes to have access to the so-tcpreplay image.
|
# Distributed managers must run this in order for the sensor nodes to have access to the so-tcpreplay image.
|
||||||
@@ -252,6 +276,7 @@ function add_sensor_to_minion() {
|
|||||||
if [[ $is_pcaplimit ]]; then
|
if [[ $is_pcaplimit ]]; then
|
||||||
echo " config:" >> $PILLARFILE
|
echo " config:" >> $PILLARFILE
|
||||||
echo " diskfreepercentage: 60" >> $PILLARFILE
|
echo " diskfreepercentage: 60" >> $PILLARFILE
|
||||||
|
pcapspace
|
||||||
fi
|
fi
|
||||||
echo " " >> $PILLARFILE
|
echo " " >> $PILLARFILE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ suricata:
|
|||||||
description: File size limit per thread. To determine max PCAP size multiple threads x max-files x limit.
|
description: File size limit per thread. To determine max PCAP size multiple threads x max-files x limit.
|
||||||
helpLink: suricata.html
|
helpLink: suricata.html
|
||||||
mode:
|
mode:
|
||||||
description: Suricata PCAP mode. Currenlty only multi is supported.
|
description: Suricata PCAP mode. Currently only multi is supported.
|
||||||
advanced: True
|
advanced: True
|
||||||
readonly: True
|
readonly: True
|
||||||
helpLink: suricata.html
|
helpLink: suricata.html
|
||||||
|
|||||||
Reference in New Issue
Block a user