mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
disable logstash on heavynodes
This commit is contained in:
@@ -528,7 +528,6 @@ function createHEAVYNODE() {
|
|||||||
pcapspace
|
pcapspace
|
||||||
add_elasticsearch_to_minion
|
add_elasticsearch_to_minion
|
||||||
add_elastic_agent_to_minion
|
add_elastic_agent_to_minion
|
||||||
add_logstash_to_minion
|
|
||||||
add_sensor_to_minion
|
add_sensor_to_minion
|
||||||
add_strelka_to_minion
|
add_strelka_to_minion
|
||||||
add_redis_to_minion
|
add_redis_to_minion
|
||||||
|
|||||||
@@ -308,6 +308,21 @@ clone_to_tmp() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disable_logstash_heavynodes() {
|
||||||
|
c=0
|
||||||
|
printf "\nChecking for heavynodes and disabling Logstash if they exist\n"
|
||||||
|
for file in /opt/so/saltstack/local/pillar/minions/*.sls; do
|
||||||
|
if [[ $file =~ "_heavynode.sls" && ! $file =~ "/opt/so/saltstack/local/pillar/minions/adv_" ]]; then
|
||||||
|
if [ $c -eq 0 ]; then
|
||||||
|
((c++))
|
||||||
|
FINAL_MESSAGE_QUEUE+=("Logstash has been disabled on all heavynodes. It can be re-enabled via Grid Configuration in SOC.")
|
||||||
|
fi
|
||||||
|
echo "Disabling Logstash for: $file"
|
||||||
|
so-yaml.py replace "$file" logstash.enabled False
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
enable_highstate() {
|
enable_highstate() {
|
||||||
echo "Enabling highstate."
|
echo "Enabling highstate."
|
||||||
salt-call state.enable highstate -l info --local
|
salt-call state.enable highstate -l info --local
|
||||||
@@ -477,7 +492,7 @@ post_to_2.4.70() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_to_2.4.80() {
|
post_to_2.4.80() {
|
||||||
echo "Nothing to apply"
|
disable_logstash_heavynodes
|
||||||
POSTVERSION=2.4.80
|
POSTVERSION=2.4.80
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user