mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
combine local and default pillars to get pillar values locally
This commit is contained in:
@@ -266,8 +266,17 @@ check_log_size_limit() {
|
|||||||
|
|
||||||
local current_limit
|
local current_limit
|
||||||
echo "getting log_size_limit pillar in check_log_size_limit"
|
echo "getting log_size_limit pillar in check_log_size_limit"
|
||||||
current_limit=$(lookup_pillar "log_size_limit" "elasticsearch")
|
|
||||||
|
# since it is possible for the salt-master service to be stopped when this is run, we need to check the pillar values locally
|
||||||
|
# we need to combine default local and default pillars before doing this so we can define --pillar-root in salt-call
|
||||||
|
local epoch_date=$(date +%s%N)
|
||||||
|
mkdir -p /opt/so/saltstack/soup_tmp_${epoch_date}/
|
||||||
|
cp -r /opt/so/saltstack/default/pillar/ /opt/so/saltstack/soup_tmp_${epoch_date}/
|
||||||
|
# use \cp here to overwrite any pillar files from default with those in local for the tmp directory
|
||||||
|
\cp -r /opt/so/saltstack/local/pillar/ /opt/so/saltstack/soup_tmp_${epoch_date}/
|
||||||
|
current_limit=$(salt-call pillar.get elasticsearch:log_size_limit --local --pillar-root=/opt/so/saltstack/soup_tmp_${epoch_date}/pillar)
|
||||||
echo "found log_size_limit to be $current_limit"
|
echo "found log_size_limit to be $current_limit"
|
||||||
|
rm -rf /opt/so/saltstack/soup_tmp_${epoch_date}/
|
||||||
|
|
||||||
local percent
|
local percent
|
||||||
case $node_type in
|
case $node_type in
|
||||||
|
|||||||
Reference in New Issue
Block a user