From d7cf3734500af3c32d4205dff2c266c87954e79b Mon Sep 17 00:00:00 2001 From: Tsvetomir Hristov Date: Fri, 11 Oct 2024 12:11:53 +0200 Subject: [PATCH] Moving health checking to the host --- ct/elasticsearch.sh | 6 ++++++ install/elasticsearch-install.sh | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ct/elasticsearch.sh b/ct/elasticsearch.sh index 6472eb69..329ce95e 100644 --- a/ct/elasticsearch.sh +++ b/ct/elasticsearch.sh @@ -80,6 +80,12 @@ start build_container description +msg_info "Checking Health" +echo "User: $ELASTIC_USER" +echo "Password: $ELASTIC_PASSWORD" +$STD curl -XGET --insecure --fail --user $ELASTIC_USER:$ELASTIC_PASSWORD https://${IP}:$ELASTIC_PORT/_cluster/health?pretty +msg_ok "Checked Health" + msg_ok "Completed Successfully!\n" echo -e "${APP} is installed, you can check it's health by running: ${BL}curl -XGET --insecure --fail --user $ELASTIC_USER:$ELASTIC_PASSWORD https://${IP}:$ELASTIC_PORT/_cluster/health?pretty${CL} diff --git a/install/elasticsearch-install.sh b/install/elasticsearch-install.sh index 8f0f923a..651dcd89 100644 --- a/install/elasticsearch-install.sh +++ b/install/elasticsearch-install.sh @@ -52,13 +52,6 @@ KIBANA_TOKEN=$($STD /usr/share/elasticsearch/bin/elasticsearch-create-enrollment ENROLLMENT_TOKEN=$($STD /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node) msg_ok "Configured User" -msg_info "Checking Health" -ELASTIC_PORT=9200 -echo "User: $ELASTIC_USER" -echo "Password: $ELASTIC_PASSWORD" -$STD curl -XGET --insecure --fail --user $ELASTIC_USER:$ELASTIC_PASSWORD https://localhost:$ELASTIC_PORT/_cluster/health?pretty -msg_ok "Checked Health" - motd_ssh customize