Skip to content

Commit

Permalink
Wait for Kibana /api/status to return metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Sep 2, 2020
1 parent 8bae5da commit 428b503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metricbeat/module/kibana/_meta/Dockerfile
@@ -1,4 +1,4 @@
ARG KIBANA_VERSION
FROM docker.elastic.co/kibana/kibana:${KIBANA_VERSION}
HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD python -c 'import urllib, json; response = urllib.urlopen("http://myelastic:changeme@localhost:5601/api/status"); data = json.loads(response.read()); exit(1) if data["status"]["overall"]["state"] != "green" else exit(0);'
HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD python -c 'import urllib, json; response = urllib.urlopen("http://myelastic:changeme@localhost:5601/api/status"); data = json.loads(response.read()); exit(1) if (data["status"]["overall"]["state"] != "green" or "metrics" not in data) else exit(0);'

0 comments on commit 428b503

Please sign in to comment.