Add Elasticsearch cluster configuration (#146)

This commit is contained in:
AlfonsoRBJ
2019-04-25 15:52:05 +02:00
committed by Jesús Linares
parent 3d8d612298
commit 3f75dbdd39
6 changed files with 67 additions and 5 deletions
+10 -5
View File
@@ -3,11 +3,7 @@
set -e
if [ "x${ELASTICSEARCH_URL}" = "x" ]; then
el_url="http://elasticsearch:9200"
else
el_url="${ELASTICSEARCH_URL}"
fi
el_url=${ELASTICSEARCH_URL}
if [ "x${WAZUH_API_URL}" = "x" ]; then
wazuh_url="https://wazuh"
@@ -94,5 +90,14 @@ curl -XPUT "$el_url/_cluster/settings" -H 'Content-Type: application/json' -d'
}
'
# Set cluster delayed timeout when node falls
curl -X PUT "$el_url/_all/_settings" -H 'Content-Type: application/json' -d'
{
"settings": {
"index.unassigned.node_left.delayed_timeout": "'"$CLUSTER_DELAYED_TIMEOUT"'"
}
}
'
echo "Elasticsearch is ready."