Skip to content

Commit

Permalink
Remove overwrite variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm committed May 24, 2024
1 parent d1ba6a2 commit aafd7b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/stack/_static/fleet-server-healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ NUMBER_SUCCESSES=$1
WAITING_TIME=$2

healthcheck() {
curl --cacert /etc/ssl/elastic-agent/ca-cert.pem -f https://localhost:8220/api/status | grep -i healthy 2>&1 >/dev/null
curl -s --cacert /etc/ssl/elastic-agent/ca-cert.pem -f https://localhost:8220/api/status | grep -i healthy 2>&1 >/dev/null
}

# Fleet Server can restart after announcing to be healthy, agents connecting during this restart will
# fail to enroll. Expect 3 healthy healthchecks before considering it healthy.
NUMBER_SUCCESSES=3
for i in $(seq $NUMBER_SUCCESSES); do
for i in $(seq "$NUMBER_SUCCESSES"); do
echo "Iter $i"
healthcheck
sleep "$WAITING_TIME"
done
Expand Down

0 comments on commit aafd7b0

Please sign in to comment.