Skip to content

Commit 033b329

Browse files
committed
improve kibana docker health-cmd
1 parent 0363e54 commit 033b329

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ docker-kibana-with-tls: docker-network docker-elasticsearch set-kibana-password
168168
-e LOGGING_ROOT_LEVEL=debug \
169169
--name $(KIBANA_NAME) \
170170
--network $(ELASTICSEARCH_NETWORK) \
171-
--health-cmd="curl -k https://localhost:5601/api/status" \
171+
--health-cmd="$$(curl -w '%{http_code}' -k https://localhost:5601/api/status) | grep -q '200'" \
172172
--health-interval=10s --health-timeout=5s --health-retries=10 \
173173
docker.elastic.co/kibana/kibana:$(STACK_VERSION)
174174
@ $(call wait_until_healthy, $(KIBANA_NAME))
@@ -214,7 +214,6 @@ create-es-bearer-token: ## Creates and outputs a new OAuth bearer token. This ex
214214

215215
.PHONY: setup-kibana-fleet
216216
setup-kibana-fleet: ## Creates the agent and integration policies required to run Fleet. This expects Kibana to be available at localhost:5601
217-
@ curl --retry 5 --retry-all-errors -s -o /dev/null -w '%{http_code}' http://localhost:5601/api/status | grep -q "200"
218217
curl $(CURL_OPTS) -H "kbn-xsrf: true" http://localhost:5601/api/fleet/fleet_server_hosts -d '{"name":"default","host_urls":["$(FLEET_ENDPOINT)"],"is_default":true}'
219218
curl $(CURL_OPTS) -H "kbn-xsrf: true" http://localhost:5601/api/fleet/agent_policies -d '{"id":"fleet-server","name":"Fleet Server","namespace":"default","monitoring_enabled":["logs","metrics"]}'
220219
curl $(CURL_OPTS) -H "kbn-xsrf: true" http://localhost:5601/api/fleet/package_policies -d '{"name":"fleet-server","namespace":"default","policy_id":"fleet-server","enabled":true,"inputs":[{"type":"fleet-server","enabled":true,"streams":[],"vars":{}}],"package":{"name":"fleet_server","version":"1.5.0"}}'

0 commit comments

Comments
 (0)