mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into issue/937
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
{ "rename": { "field": "message2.scan", "target_field": "scan", "ignore_missing": true } },
|
{ "rename": { "field": "message2.scan", "target_field": "scan", "ignore_missing": true } },
|
||||||
{ "rename": { "field": "message2.request", "target_field": "request", "ignore_missing": true } },
|
{ "rename": { "field": "message2.request", "target_field": "request", "ignore_missing": true } },
|
||||||
{ "rename": { "field": "scan.hash", "target_field": "hash", "ignore_missing": true } },
|
{ "rename": { "field": "scan.hash", "target_field": "hash", "ignore_missing": true } },
|
||||||
|
{ "grok": { "field": "request.attributes.filename", "patterns": ["-%{WORD:log.id.fuid}-"] } },
|
||||||
{ "remove": { "field": ["host", "path"], "ignore_missing": true } },
|
{ "remove": { "field": ["host", "path"], "ignore_missing": true } },
|
||||||
{ "pipeline": { "name": "common" } }
|
{ "pipeline": { "name": "common" } }
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{%- set HOSTNAME = salt['grains.get']('host', '') %}
|
{%- set HOSTNAME = salt['grains.get']('host', '') %}
|
||||||
{%- set BROVER = salt['pillar.get']('static:broversion', 'COMMUNITY') %}
|
{%- set BROVER = salt['pillar.get']('static:broversion', 'COMMUNITY') %}
|
||||||
{%- set WAZUHENABLED = salt['pillar.get']('static:wazuh', '0') %}
|
{%- set WAZUHENABLED = salt['pillar.get']('static:wazuh', '0') %}
|
||||||
{%- set STRELKAENABLED = salt['pillar.get']('static:strelka', '0') %}
|
{%- set STRELKAENABLED = salt['pillar.get']('strelka:enabled', '0') %}
|
||||||
{%- set FLEETMASTER = salt['pillar.get']('static:fleet_master', False) -%}
|
{%- set FLEETMASTER = salt['pillar.get']('static:fleet_master', False) -%}
|
||||||
{%- set FLEETNODE = salt['pillar.get']('static:fleet_node', False) -%}
|
{%- set FLEETNODE = salt['pillar.get']('static:fleet_node', False) -%}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ output {
|
|||||||
key => 'logstash:unparsed'
|
key => 'logstash:unparsed'
|
||||||
congestion_interval => 1
|
congestion_interval => 1
|
||||||
congestion_threshold => 50000000
|
congestion_threshold => 50000000
|
||||||
batch ==> True
|
batch => true
|
||||||
batch_events => {{ BATCH }}
|
batch_events => {{ BATCH }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -617,7 +617,12 @@ detect_os() {
|
|||||||
systemctl start NetworkManager;
|
systemctl start NetworkManager;
|
||||||
} >> "$setup_log" 2<&1
|
} >> "$setup_log" 2<&1
|
||||||
fi
|
fi
|
||||||
yum -y install yum-plugin-versionlock bc >> "$setup_log" 2>&1
|
if ! command -v bc > /dev/null 2>&1; then
|
||||||
|
yum -y install bc >> "$setup_log" 2>&1
|
||||||
|
fi
|
||||||
|
if ! yum versionlock > /dev/null 2>&1; then
|
||||||
|
yum -y install yum-plugin-versionlock >> "$setup_log" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [ -f /etc/os-release ]; then
|
elif [ -f /etc/os-release ]; then
|
||||||
|
|||||||
@@ -51,21 +51,22 @@ echo "---- Starting setup at $(date -u) ----" >> $setup_log 2>&1
|
|||||||
|
|
||||||
automated=no
|
automated=no
|
||||||
function progress() {
|
function progress() {
|
||||||
|
local title='Security Onion Install'
|
||||||
if grep -q "ERROR" $setup_log || [[ -s /var/spool/mail/root ]]; then
|
if grep -q "ERROR" $setup_log || [[ -s /var/spool/mail/root ]]; then
|
||||||
if [[ -s /var/spool/mail/root ]]; then
|
if [[ -s /var/spool/mail/root ]]; then
|
||||||
echo '[ ERROR ] /var/spool/mail/root grew unexpectedly' >> $setup_log 2>&1
|
echo '[ ERROR ] /var/spool/mail/root grew unexpectedly' >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $automated == no ]]; then whiptail_setup_failed; else exit 1; fi
|
export SO_ERROR=1
|
||||||
|
export SKIP_REBOOT=1
|
||||||
|
title="Error found, please check $setup_log"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $SKIP_REBOOT ]]; then shutdown -r now; else exit 1; fi
|
|
||||||
else
|
|
||||||
if [ $automated == no ]; then
|
if [ $automated == no ]; then
|
||||||
whiptail --title "Security Onion Install" --gauge 'Please wait while installing' 6 60 0
|
whiptail --title "$title" --gauge 'Please wait while installing...' 6 60 0 # append to text
|
||||||
else
|
else
|
||||||
cat >> $setup_log 2>&1
|
cat >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -f automation/$automation && $(basename $automation) == $automation ]]; then
|
if [[ -f automation/$automation && $(basename $automation) == $automation ]]; then
|
||||||
@@ -614,21 +615,17 @@ fi
|
|||||||
} | progress
|
} | progress
|
||||||
|
|
||||||
success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}')
|
success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}')
|
||||||
if [[ "$success" = 0 ]]; then
|
|
||||||
whiptail_setup_complete
|
|
||||||
|
|
||||||
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||||
export IP=$ALLOW_CIDR
|
IP=$ALLOW_CIDR so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
||||||
so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $THEHIVE == 1 ]]; then
|
if [[ $success != 0 || -z $SO_ERROR ]]; then whiptail_setup_failed
|
||||||
check_hive_init
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
whiptail_setup_failed
|
whiptail_setup_complete
|
||||||
|
if [[ $THEHIVE == 1 ]]; then check_hive_init; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $SKIP_REBOOT ]]; then
|
install_cleanup >> $setup_log 2>&1
|
||||||
shutdown -r now
|
|
||||||
fi
|
if [[ -z $SKIP_REBOOT ]]; then shutdown -r now; else exit; fi
|
||||||
|
|||||||
@@ -1036,17 +1036,13 @@ whiptail_setup_complete() {
|
|||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
whiptail --title "Security Onion Setup" --msgbox "Finished $install_type install. Press Ok to reboot." 8 75
|
whiptail --title "Security Onion Setup" --msgbox "Finished $install_type install. Press Ok to reboot." 8 75
|
||||||
install_cleanup >> $setup_log 2>&1
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_setup_failed() {
|
whiptail_setup_failed() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
whiptail --title "Security Onion Setup" --msgbox "Install had a problem. Please see $setup_log for details. Press Ok to reboot." 8 75
|
whiptail --title "Security Onion Setup" --msgbox "Install had a problem. Please see $setup_log for details. Press Ok to exit." 8 75
|
||||||
install_cleanup >> $setup_log 2>&1
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_shard_count() {
|
whiptail_shard_count() {
|
||||||
|
|||||||
Reference in New Issue
Block a user