forked from wazuh/wazuh-docker
Elasticserach 7 - Template mangement (#262)
Former-commit-id: 2113b5b3d5
This commit is contained in:
committed by
Jesús Linares
parent
ddd37f0f9a
commit
d15ea1ff51
@@ -106,17 +106,13 @@ if [ $ENABLE_CONFIGURE_S3 ]; then
|
||||
|
||||
fi
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Elastic Stack users creation.
|
||||
# Only security main node can manage users.
|
||||
# Load custom policies.
|
||||
##############################################################################
|
||||
|
||||
echo "LOAD SETTINGS - Run users_management.sh."
|
||||
MY_HOSTNAME=`hostname`
|
||||
echo "LOAD SETTINGS - Hostname: $MY_HOSTNAME"
|
||||
if [[ $SECURITY_MAIN_NODE == $MY_HOSTNAME ]]; then
|
||||
bash /usr/share/elasticsearch/35-load_settings_users_management.sh &
|
||||
fi
|
||||
echo "LOAD SETTINGS - Loading custom Elasticsearch policies."
|
||||
bash /usr/share/elasticsearch/35-load_settings_policies.sh
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -132,9 +128,30 @@ sed -i 's:"index.number_of_replicas"\: "0":"index.number_of_replicas"\: "'$WAZUH
|
||||
# Load default templates
|
||||
##############################################################################
|
||||
|
||||
echo "LOAD SETTINGS - Loading wazuh-alerts template."
|
||||
cat /usr/share/elasticsearch/config/wazuh-template.json | curl -XPUT "$el_url/_template/wazuh" ${auth} -H 'Content-Type: application/json' -d @-
|
||||
sleep 5
|
||||
echo "LOAD SETTINGS - Loading wazuh-alerts template"
|
||||
bash /usr/share/elasticsearch/35-load_settings_templates.sh
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Load custom aliases.
|
||||
##############################################################################
|
||||
|
||||
echo "LOAD SETTINGS - Loading custom Elasticsearch aliases."
|
||||
bash /usr/share/elasticsearch/35-load_settings_aliases.sh
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Elastic Stack users creation.
|
||||
# Only security main node can manage users.
|
||||
##############################################################################
|
||||
|
||||
echo "LOAD SETTINGS - Run users_management.sh."
|
||||
MY_HOSTNAME=`hostname`
|
||||
echo "LOAD SETTINGS - Hostname: $MY_HOSTNAME"
|
||||
if [[ $SECURITY_MAIN_NODE == $MY_HOSTNAME ]]; then
|
||||
bash /usr/share/elasticsearch/35-load_settings_users_management.sh &
|
||||
fi
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Prepare Wazuh API credentials
|
||||
|
||||
Reference in New Issue
Block a user