diff --git a/libbeat/docker-compose.yml b/libbeat/docker-compose.yml index be4c0be7dfa..ebd23373325 100644 --- a/libbeat/docker-compose.yml +++ b/libbeat/docker-compose.yml @@ -65,8 +65,7 @@ services: file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml service: elasticsearch healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9200"] - + test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] elasticsearchssl: extends: file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml diff --git a/testing/environments/latest.yml b/testing/environments/latest.yml index 97813f64782..d5f35e6ec74 100644 --- a/testing/environments/latest.yml +++ b/testing/environments/latest.yml @@ -5,7 +5,7 @@ services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0 healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9200"] + test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 300 interval: 1s environment: diff --git a/testing/environments/snapshot-oss.yml b/testing/environments/snapshot-oss.yml index a646c90bcc7..4b1973fc7ce 100644 --- a/testing/environments/snapshot-oss.yml +++ b/testing/environments/snapshot-oss.yml @@ -5,7 +5,7 @@ services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0-SNAPSHOT healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9200"] + test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 300 interval: 1s environment: diff --git a/testing/environments/snapshot.yml b/testing/environments/snapshot.yml index 43238f4f0fd..64679eb3776 100644 --- a/testing/environments/snapshot.yml +++ b/testing/environments/snapshot.yml @@ -5,7 +5,7 @@ services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0-SNAPSHOT healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9200"] + test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 300 interval: 1s environment: diff --git a/x-pack/libbeat/docker-compose.yml b/x-pack/libbeat/docker-compose.yml index 8accd638f14..81b6960c90c 100644 --- a/x-pack/libbeat/docker-compose.yml +++ b/x-pack/libbeat/docker-compose.yml @@ -29,7 +29,7 @@ services: file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml service: elasticsearch healthcheck: - test: ["CMD-SHELL", "curl http://myelastic:changeme@localhost:9200/_cat/health?h=status | grep -q green"] + test: ["CMD-SHELL", "curl -u myelastic:changeme -f http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 1200 interval: 5s start_period: 60s