change pause time for elk
@@ -69,7 +69,7 @@ then
echo "Configure ELK"
cd $ELASTICSEARCH_HOME/bin
sudo -E su datafari -p -c "bash elasticsearch -p $ELASTICSEARCH_PID_FILE" &
- sleep 15
+ sleep 10
#Test if Elasticsearch is up, if not then exit
curl -s --fail -XGET http://localhost:9200/ || { echo "Fail to reach Elasticsearch on localhost:9200"; echo "Please check your network connection and, in case a proxy is configured, that a proxy exception exists for 'localhost' and '127.0.0.1' !"; sudo -E su datafari -p -c "kill $(cat $ELASTICSEARCH_PID_FILE)"; exit 1; }
@@ -77,7 +77,7 @@ then
sudo -E su datafari -p -c "sed -i '/pid\.file/c\pid.file: ${KIBANA_PID_FILE}' $KIBANA_HOME/config/kibana.yml"
cd $KIBANA_HOME/bin
sudo -E su datafari -p -c "bash kibana" &
- sleep 20
+ sleep 10
kibana_config=$(curl -s http://localhost:9200/.kibana/config/_search | jq -r '.hits.hits | .[0] | ._id')
curl -H 'Content-Type: application/json' -XPUT -d @/opt/datafari/elk/logstash/templates/datafari-monitoring-template.json http://localhost:9200/_template/datafari-monitoring
curl -H 'Content-Type: application/json' -XPUT -d @/opt/datafari/elk/logstash/templates/datafari-statistic-template.json http://localhost:9200/_template/datafari-statistics
