Skip to content

Commit

Permalink
Update Kibana Healthcheck Script + Increase ES Req Timeout.
Browse files Browse the repository at this point in the history
Signed-off-by: Sherif Abdel-Naby <[email protected]>
  • Loading branch information
sherifabdlnaby committed Jun 30, 2020
1 parent 733721b commit 28061c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions kibana/config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ elasticsearch.username: ${ELASTIC_USERNAME}
elasticsearch.password: ${ELASTIC_PASSWORD}
elasticsearch.ssl.certificateAuthorities: [ "/certs/ca.crt" ]


## Misc
elasticsearch.requestTimeout: 90000



## ElastAlert Plugin
#elastalert-kibana-plugin.serverHost: elastalert
#elastalert-kibana-plugin.serverPort: 3030
3 changes: 1 addition & 2 deletions kibana/scripts/docker-healthcheck
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
set -eo pipefail

host="$(hostname --ip-address || echo '127.0.0.1')"
if health="$(curl -fsSL "http://$ELASTIC_USERNAME:$ELASTIC_PASSWORD@$host:5601/api/status" | python -c "import sys, json; print json.load(sys.stdin)['status']['overall']['state']")"; then
if health="$(curl -fsSkL "https://$ELASTIC_USERNAME:$ELASTIC_PASSWORD@$host:5601/api/status" | python -c "import sys, json; print json.load(sys.stdin)['status']['overall']['state']")"; then
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
if [ "$health" = 'green' ]; then
exit 0
fi
echo >&2 "unexpected health status: $health"
fi

exit 1

0 comments on commit 28061c9

Please sign in to comment.