aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/templates/default/ready-probe.sh.erb
blob: 66b07873e59c5224bc6f966c3c00048c8e7d5a48 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash

health_Check_http_code=$(curl -o /dev/null -w '%{http_code}' http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow&timeout=120s)
if [[ "$health_Check_http_code" -eq 200 ]]; then
   exit 200
else
   exit $health_Check_http_code
fi