Use config template for wazuh.yml

- Use a clean template without enabled defaults
- Remove legacy code to clean defaults
This commit is contained in:
Manuel Gutierrez
2020-10-19 13:02:09 +02:00
parent 47ee64b13f
commit ee59bf6f38
3 changed files with 163 additions and 5 deletions
@@ -7,8 +7,6 @@ api_user="${API_USER:-wazuh}"
api_password="${API_PASS:-wazuh}"
kibana_config_file="/usr/share/kibana/optimize/wazuh/config/wazuh.yml"
mkdir -p /usr/share/kibana/optimize/wazuh/config/
touch $kibana_config_file
declare -A CONFIG_MAP=(
[pattern]=$PATTERN
@@ -45,9 +43,6 @@ do
fi
done
# remove default API entry (new in 3.11.0_7.5.1)
sed -ie '/- default:/,+4d' $kibana_config_file
CONFIG_CODE=$(curl ${auth} -s -o /dev/null -w "%{http_code}" -XGET $el_url/.wazuh/_doc/1513629884013)
grep -q 1513629884013 $kibana_config_file