forked from wazuh/wazuh-docker
Add checking into steps and container names
This commit is contained in:
@@ -155,7 +155,7 @@ jobs:
|
|||||||
for i in {1..10}; do
|
for i in {1..10}; do
|
||||||
echo "Checking Wazuh indexer health (Attempt $i/10)"
|
echo "Checking Wazuh indexer health (Attempt $i/10)"
|
||||||
RESPONSE=$(curl -XGET "https://0.0.0.0:9200/_cluster/health?pretty" -u admin:admin -k -s --retry 2 || true)
|
RESPONSE=$(curl -XGET "https://0.0.0.0:9200/_cluster/health?pretty" -u admin:admin -k -s --retry 2 || true)
|
||||||
|
INDEXER_CONTAINERS=$(docker ps --format '{{.Names}}' | grep "indexer")
|
||||||
if echo "$RESPONSE" | grep -qE "green|yellow"; then
|
if echo "$RESPONSE" | grep -qE "green|yellow"; then
|
||||||
echo "Cluster Online"
|
echo "Cluster Online"
|
||||||
echo "$RESPONSE"
|
echo "$RESPONSE"
|
||||||
@@ -381,13 +381,12 @@ jobs:
|
|||||||
for i in {1..20}; do
|
for i in {1..20}; do
|
||||||
echo "Checking Wazuh indexer health (Attempt $i/10)"
|
echo "Checking Wazuh indexer health (Attempt $i/10)"
|
||||||
RESPONSE=$(curl -XGET "https://0.0.0.0:9200/_cluster/health?pretty" -u admin:admin -k -s --retry 2 || true)
|
RESPONSE=$(curl -XGET "https://0.0.0.0:9200/_cluster/health?pretty" -u admin:admin -k -s --retry 2 || true)
|
||||||
|
INDEXER_CONTAINERS=$(docker ps --format '{{.Names}}' | grep "indexer")
|
||||||
if echo "$RESPONSE" | grep -qE "green|yellow"; then
|
if echo "$RESPONSE" | grep -qE "green|yellow"; then
|
||||||
echo "Cluster Online"
|
echo "Cluster Online"
|
||||||
echo "$RESPONSE"
|
echo "$RESPONSE"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Waiting for cluster to be online"
|
echo "Waiting for cluster to be online"
|
||||||
for CONTAINER_NAME in $INDEXER_CONTAINERS; do
|
for CONTAINER_NAME in $INDEXER_CONTAINERS; do
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user